Zoom not centering

Home Forums MapPress Support Zoom not centering

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #18095

    Hi Chris,

    I’ve noticed that when I set a zoom greater than 14, it tends to move to the left of the point. Doesn’t matter if I am doing it when initializing the map:

    new Mappress_Map(array("center"=>$mapCenter,"zoom"=>10,"width" => "99.9%", "height"=>$mapHeight))

    or recentering via JS like so:

    mapp0.zoom = 10;
    mapp0.center.lat = centerPoint.lat;
    mapp0.center.lng = centerPoint.lng;

    Either way, it moves off to the left, on mobile devices on zoom level 10, the original point completely goes off screen. Am I missing something?



    I can only guess, but this could be caused by the map not being centered at the exact lat/lng of the POI (I assume you’re centering on a POI?). Or, it could be the map isn’t displaying at the correct size, in which can you’ll need to call the resize() method.

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