Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit of the map #205

Closed
mapsforge opened this issue Nov 6, 2014 · 9 comments
Closed

Limit of the map #205

mapsforge opened this issue Nov 6, 2014 · 9 comments

Comments

@mapsforge
Copy link
Owner

From carlito...@gmail.com on November 10, 2011 02:39:20

Hi Mapsforge team!

I'm very to use this mapping tool in my project, is working properply, and is very simple to use it. But I've a question about the loaded maps. I'm working in an offline project, and I'm using obviously a map file to do it. I would like that the users can't navigate more far than the limits of this map. Is it possible? It will be so nice to me.

Thanks for all!
Carlos

Original issue: http://code.google.com/p/mapsforge/issues/detail?id=205

@mapsforge
Copy link
Owner Author

From thilo.mu...@gmail.com on December 06, 2011 13:14:09

Currently it is not possible to restrict the navigable region of the map to a certain area. We can keep this issue as a feature request, but it may take longer until somebody starts to work on it as many other issues are more important for us.

Status: Accepted
Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

@mapsforge
Copy link
Owner Author

From elpablos...@gmail.com on December 22, 2011 03:07:50

Implement it please, it is a must ! Set maximum and minimum coordinates to the map movement. Now, if the user moves the map, he can go out of barcelona city, but i dont want that, because i only am displaying the Barcelona city area, and the
rest of the world is WHITE.

@mapsforge
Copy link
Owner Author

From jm.pereira.g@gmail.com on September 04, 2012 03:18:59

I attached my work ;) To define the limits include this line:

mapView.setMapViewLimits(topLat, bottomLat, leftLong, rightLong);

I'll explain in detail when I have some time.

It's not perfect but you can use.

Attachment: mapsforge-map-0.3.0-jar-with-dependencies.jar MapView.java MapViewLimits.java MapViewPosition.java MapViewProjection.java MapZoomControls.java

@mapsforge
Copy link
Owner Author

From jos...@gmail.com on September 04, 2012 03:24:34

It would be very convenient to set map limits from map file bounding box automatically.

@mapsforge
Copy link
Owner Author

From thilo.mu...@gmail.com on September 04, 2012 12:57:06

Thank you for your efforts but please provider patch files against the SVN Head version rather than full Java classes. You should also use the BoundingBox class rathern than four double parameters. Have you checked your code with our PMD/Checkstyle profiles?

@mapsforge
Copy link
Owner Author

From thilo.mu...@gmail.com on January 16, 2013 13:52:02

The whole mapsforge-map library is currently being rewritten from scratch. There is a Git branch called "rewrite" for that. One of the main ideas of the new implementation was to have only a single place in the code where the map position is stored and also chanced - the MapViewPosition class. This makes it easy to limit the zoom level range and also the navigable map position. You can set a bounding box as the map limit which will cannot be left.

I will keep this issue in state "Started" until we have released version 0.4.0 (which will probably take some more weeks).

Status: Started
Owner: thilo.mu...@gmail.com

@mapsforge
Copy link
Owner Author

From carlito...@gmail.com on January 16, 2013 13:58:25

Thanks for your great job with the library. Please, keep us posted when you will have this feature completed.

@mapsforge
Copy link
Owner Author

From thilo.mu...@gmail.com on May 18, 2013 07:01:06

This is fixed in the upcoming 0.4.0 version. There will not be any changes or fixes for this issue in the 0.3 branch.

@mapsforge
Copy link
Owner Author

From thilo.mu...@gmail.com on May 18, 2013 07:01:20

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant