Zoom level not kept when POI moved

Home Forums MapPress Support Zoom level not kept when POI moved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #10285

    Hello 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?




    Hi, 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.


    Curious 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.


    A 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.



    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.


Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.