Sha256: 134abfb87cfa22b3bc40828026faac3f76ea85dd3c506e47e1f82a3a779faa7e
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
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 ```ruby gem install map-kit-wrapper ``` ## Setup Edit the `Rakefile` of your RubyMotion project and add the following require line. ```ruby require 'map-kit-wrapper' ``` ## Example ```ruby 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 ```ruby @map.user_located? ``` Get the users coordinates ```ruby @map.user_coordinates ```
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
map-kit-wrapper-0.0.1 | README.md |