lishxi / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Limit Scrolling of an Area in an Offline City Map #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Map source used: OSM Mapnik
Library: osmdroid-android-3.0.1.jar
I managed to download only a small area of a city using MOBAC.

I have a small map of a city display on Android. When the user scrolls beyond 
the boundaries of the city map it will just display a grey empty screen. How do 
I get the total map size of my small map? What I see on my /tiles/Manpik 
directory are just .png images but when my program runs it shows the map. 

I have seen this existing issue but still I don't have any idea on how to solve 
the problem: 
http://code.google.com/p/osmdroid/issues/detail?id=209
http://stackoverflow.com/questions/5403733/restricting-the-area-the-user-can-go-
to-on-mapview

I have also checked out the attached files from Issue 209: 
LimitScrollToGeographicArea.patch, scrollToMethod.txt but I cannot understand 
how to use patch files, and it is a little bit advance for I am a beginner. I 
have also tried to implement the class but many errors occurred. As a beginner 
I need a more understandable codes to implement or classes. Thank you for your 
support. 

Original issue reported on code.google.com by lordzden...@gmail.com on 12 Oct 2011 at 8:33

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by neilboyd on 12 Oct 2011 at 9:27