tillnagel / unfolding

A library to create interactive maps and geovisualizations in Processing and Java
http://unfoldingmaps.org
Other
477 stars 245 forks source link

zoomAndPanTo goes around in circles #164

Closed davidbambalan closed 5 years ago

davidbambalan commented 5 years ago

Writing zoomAndPanTo(); in draw() pans the map in circles. Is there a way I can change the location dynamically through code and not hard-coding it?

tillnagel commented 5 years ago

Can you be more specific, or give an example on what you are trying to achieve?

What do you mean by "pans the map in circles"? zoomAndPanTo() zooms to the specified level, and pans to the specified location.

davidbambalan commented 5 years ago

How do I pan the map according to the location of the GPS sensor I'm using?

davidbambalan commented 5 years ago

Does the getLocation(float x, float y) still work?

tillnagel commented 5 years ago

Still not fully sure what you are trying to do.

But if you simply want to convert geo-locations to screen coordinates check out the SimpleConversionMapApp and if you want to pan the map to a location then check out the PanAnimationMapApp example.