Home › Forums › MapPress Support › Zoom level not kept when POI moved
- This topic has 4 replies, 2 voices, and was last updated 11 years, 3 months ago by
Chris.
-
AuthorPosts
-
August 24, 2012 at 7:50 am #10285
shawkins
ParticipantHello Chris,
I am having a problem with the zoom level on maps where a POI is added and then dragged to a new location. When the map is first opened on a page, it has the correct zoom level – the level that was set when the map was saved. However, when the map is centered the zoom level goes to zero. Also, when the map is displayed as a widget, it has a zoom level of zero.
You can see this at http://randomimages.ca/nblog/namtso-lake-4831/
When the POI has not been moved, the map retains its set zoom level as expected. You can see this at http://randomimages.ca/nblog/pelchor-chode-gyantse-4637/
Any suggestions?
Thanks,
Stephen
August 24, 2012 at 2:24 pm #10287Chris
KeymasterHi, when you drag a marker it no longer has an address associated with it – it becomes just a lat/lng coordinate. So there’s no way for the plugin to know how far to zoom in or out (it doesn’t know if it’s the location of a road, a city, or a country).
However, you can still manually set a zoom level in the map editor, and it will remember that zoom and use it when you display the map.
You can also set a specific zoom in the widget.
August 24, 2012 at 2:32 pm #10288shawkins
ParticipantCurious because when the map first loads it does have the right zoom level. You can also see that the right zoom level has been set in the database.
August 24, 2012 at 2:47 pm #10289shawkins
ParticipantA follow up…
The zoom level for the widget is set to automatic. So I assume that the zoom level in the widget is being picked up from the source map. The zoom in the source map is being set in the map editor. You can see that it is being set correctly even when the POI has been moved. As mentioned above, it shows correctly when the map is first displayed and it is set correctly in the database. So the right zoom level is there even if the POI has been moved. But for some reason, it seems to get lost when the map is centered and when the map is used in a widget.
Setting a specific zoom level in the widget doesn’t help as the source maps that feed the widget all have different zoom levels.
August 27, 2012 at 6:21 am #10304Chris
KeymasterHi,
I tested this and I see what you mean now. The problem is that the ‘center’ link automatically centers the map to show all of the POIs. It doesn’t consider the original center and zoom.
For individual maps (as opposed to mashups) it would be better if ‘center’ just reset the map back to its original cneter/zoom values. I’ll see if I can implement that for beta 2.38.6.
Until then, you may want to remove the ‘center’ link to prevent the behavior.
For mashups, like the widget, it will need to continue to automatically center, since the POIs could come from many different maps.
-
AuthorPosts
- You must be logged in to reply to this topic.