Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
MapKitWrapper for RubyMotion
Ruby
tag: v0.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
motion
spec
.gitignore
Gemfile
LICENSE
README.md
Rakefile
map_kit_wrapper.gemspec

README.md

MapKitWrapper

This is a MapKit wrapper for RubyMotion. It's purpose is to make make dealing with MapKit less painfull

It is still work in progress, but right now there are wrappers for the Map Kit Data Types and the Core Location Data Types. Those will save you a lot of typing.

Installation

gem install map-kit-wrapper

Setup

Edit the Rakefile of your RubyMotion project and add the following require line.

require 'map-kit-wrapper'

Example

def loadView
  self.view = UIView.alloc.initWithFrame(tabBarController.view.bounds)
  map = MapView.new
  map.frame = self.view.frame
  map.delegate = self
  region = CoordinateRegion.new([56, 10.6], [3.1, 3.1])
  map.region = region
  # Alternatively use set_region
  # map.set_region(region, :animated => true)
  map.showsUserLocation = true
  self.view.addSubview(map)
end

Check if the users location has been found

@map.user_located?

Get the users coordinates

@map.user_coordinates
Something went wrong with that request. Please try again.