Load the map manually | Documentation

At times, it is useful to load the map manually, instead of allowing the map to load itself after the page has loaded. This can be useful when you are waiting for some information prior to loading the map. You can also use it in conjunction with the mobile_device property to change the appearance of the map for mobile devices.

To load the map manually:

  1. Turn off auto-loading

    Edit the mapdata.js file so that main_settings.auto_load='no';. This prevents the map from loading automatically.

  2. Use JavaScript to load the map

  3. simplemaps_worldmap.hooks.ready = function (){
      // optionally update simplemaps_worldmap.mapdata
      simplemaps_worldmap.load();
    }
    

    Note that simplemaps_worldmap.hooks.ready is a JavaScript hook that lets us know that the document has finished loading. It's equivalent to jQuery's $(document).ready.

Home | License | Privacy | Releases | Testimonials | Resources | Documentation | Order Lookup | All Maps
Formerly FlashUSAmap.com and FlashWorldMap.com
© SimpleMaps.com 2010-2018