mapbox / DEPRECATED-mapbox-ios-sdk

REPLACED – use https://www.mapbox.com/ios-sdk instead
https://github.com/mapbox/mapbox-gl-native
Other
324 stars 8 forks source link

Avoid scrolling outside offline maps #585

Open tgallende opened 9 years ago

tgallende commented 9 years ago

Hi, I have a question, maybe this is not the best place to ask for it but I have not found a better place.

My question is: I need to avoid user scrolling outside its offline maps, because you can do it freely and get lost easily, not being able to come back to the map. I know -I have read about- i could try the method setConstraintsSouthWest: northEast: but I should know before hand the limits of the map, thing I don´t know. I have an mbtiles file but don´t know the coordinates of its boundaries.

Is there another way to get what I'm looking for?

Thanks in advance

friedbunny commented 9 years ago

You might try RMTileSource.latitudeLongitudeBoundingBox and then set the map constraints based on the result.