adampax / titanium-mapbox

Titanium Module Wrapper for MapBox iOS SDK
MIT License
67 stars 23 forks source link

Return latlng from mapViewRegionDidChange #7

Closed bsudekum closed 10 years ago

bsudekum commented 10 years ago

@adampax first off, great work!

I'm wondering if there is currently a way to get the map center after panning. Right now mapViewRegionDidChange does not return the new map center, I think this would be a good place to surface it. Something like:

mapView.addEventListener('mapViewRegionDidChange', function(e) {
  console.log(e.latlng);
});
adampax commented 10 years ago

@rsudekum Thanks Bobby. Good idea, I'll get that added, as I don't think that event is returning anything right now.

adampax commented 10 years ago

mapViewRegionDidChange now returns a latitude and longitude property in v0.4.

bsudekum commented 10 years ago

Awesome!