Centering + Zoom not working on development site

Home Forums MapPress Support Centering + Zoom not working on development site

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

    Hi all.

    I’m working on a mashup that pairs posts attached to KMLs for the 50 US states + DC with POIs. On my local build I’m able to center the map and set the zoom with the following shortcode added to a page template:
    [mashup zoom="4" center="39.0130254,-95.7906028" ]

    However, the same shortcode does not appear to work on the development server for the site. The map appears as zoomed out as possible and centered to the entire map projection rather than the United States:

    Both my local build and the development build have the exact same settings within the WordPress dashboard, but the local build only has a couple of KMLs for testing instead of the entire set of 51.

    Any suggestions on what could be causing this? One of the POIs previously had incorrect lat/long coordinates that placed it somewhere in Antartica and I was worried that the map might be scaling to include all POIs, but I have since fixed that POI.



    I think I see the problem: most sites use a single KML layer, so by default the map centers on that layer when it’s loaded (which is usually what people want).

    At the link you provided, the map centers and then one of the KML layers is loaded. The layer includes some small islands in the Bering Sea, which probably causes the map to zoom way out to include them.

    On the other site, the KMLs may load faster, so the map centers *after* they load. But it’s hard to say without the URL.

    Please use the contact form to send an admin login to the dev site, and I’ll try to implement a fix. I think the solution is probably to have the plugin ignore the KML bounds when a specific map center is set.

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