WordPress.org

Ready to get started?Download WordPress

Forums

WP Flexible Map
[resolved] kml & zoom (9 posts)

  1. green_w
    Member
    Posted 11 months ago #

    I have the following shortcode (using KML).

    '[flexiblemap zoom="14" scrollwheel="true" width="500" height="400" src="http://poc07.greencubewebdesign.com/wp-content/maps/lesn-blanchardstown.kml"]'

    When looking at the page http://poc07.greencubewebdesign.com/locations/dublin/blanchardstown-office/ it doesn't seem to take the zoom parameter in account. It zooms all the way in.

    How can I get it to use a zoom="14"?

    Thanks!

    http://wordpress.org/plugins/wp-flexible-map/

  2. webaware
    Member
    Plugin Author

    Posted 11 months ago #

    G'day green_w,

    Either you just fixed it, or you had something delaying the load problem because it appears to zoom just fine now. The zoom happens after the page load has completed (document "ready") so something holding that up will prevent or delay the zoom.

    cheers,
    Ross

  3. green_w
    Member
    Posted 11 months ago #

    Hi,

    You're right in part, I just realized it does work in firefox 24.0 and IE10 but I does not work in Chrome..

    Any idea why that would be?

    Walter

  4. green_w
    Member
    Posted 11 months ago #

    The weirdest thing - I just refreshed the page in chrome a few times, moved around between the pages, first time I go to the page it fails to zoom correctly, go back, go back in, then it does zoom correctly.

    Seems to be a timing issue of some sort, what would cause that?

    Walter

  5. webaware
    Member
    Plugin Author

    Posted 11 months ago #

    G'day Walter,

    That page has over 130 requests to various servers, totally 1MB. 38 of those requests are for JavaScript, which blocks the DOMContentLoaded event and is probably where your problem lies.

    My guess would be Add This, which loads its script from another domain -- that means another DNS resolution request by the browser, plus I imagine that the Add This server is having to serve lots of requests for that script -- but it's just a guess.

    Basically, if you can isolate whatever is taking a while to resolve / load and make sure that's resolved / loaded on another page then you should be OK because your (visitor's) system and browser will cache both the DNS request and the slow loading resource.

    cheers,
    Ross

  6. webaware
    Member
    Plugin Author

    Posted 11 months ago #

    Actually, looking a bit deeper, that zoom happens once the map triggers a "tilesloaded" event. I'll check whether that's the most appropriate event to trigger on, maybe there's a better one. If I can find something, there'll be a new version by the end of the weekend.

    cheers,
    Ross

  7. green_w
    Member
    Posted 11 months ago #

    Hi Ross,

    As a test I disabled the addthis plugin and it still doesn't zoom as expected, I thought I let you know..

    And thanks for the effort!

    Walter

  8. webaware
    Member
    Plugin Author

    Posted 11 months ago #

    G'day Walter,

    Please update to version 1.7.0 and let me know if this fixes it.

    cheers,
    Ross

  9. green_w
    Member
    Posted 11 months ago #

    Hi Ross,

    That did the trick alright, thanks!

    Walter

Reply

You must log in to post.

About this Plugin

About this Topic