Arunkarthicknallasami / osmdroid

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

Prevent north-south scroll wrapping #232

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We allow our map to endless scroll in any direction. This makes sense when 
scrolling East/West since the flat map projection wraps around from the left to 
the right border. However, it doesn't make sense for North/South scrolling 
since the flat map does not wrap from top to bottom.

This issue is related to Issue 209 in that we want to limit the scroll area. 
However, this is limiting scrolling in only one direction.

I suggest that we prevent the user from scrolling beyond the North/South 
borders period and that will close this ticket. We can then move towards having 
a BoundingBox that limits scrolling further.

Original issue reported on code.google.com by kurtzm...@gmail.com on 20 Jun 2011 at 7:30

GoogleCodeExporter commented 9 years ago
Additionally, Google Maps restricts North/South scroll wrapping

Original comment by kurtzm...@gmail.com on 20 Jun 2011 at 7:31

GoogleCodeExporter commented 9 years ago
Patch attached.

This patch mirrors the functionality of Google Maps. The maps will be prevented 
from scrolling endlessly to the North or South and instead will be blocked from 
scrolling beyond the N/S border. However, as does Google Maps, we allow 
overscrolling by one half the screen size. This additional overscroll area will 
be filled with "loading" tiles. The patch makes sure that the tiles in the 
overscroll area are not requested in the tile provider since they don't really 
exist.

Original comment by kurtzm...@gmail.com on 27 Jun 2011 at 8:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by kurtzm...@gmail.com on 27 Jun 2011 at 8:06

GoogleCodeExporter commented 9 years ago
Patch enhanced in Issue 209.

Original comment by kurtzm...@gmail.com on 27 Jun 2011 at 10:03