To add multiple maps to a single page, do the following:
Choose the map you want to install:
Create two unique mapdata.js files with unique names (e.g. mapdata1.js and mapdata1.js)
Set auto_load: 'no', in the main_settings of each mapdata.js file.
By default, the maps will try to install themselves in the same div, the one with the id map. To avoid this, you must set a unique div id for each map to fill by adding the attribute div to the main_settings.
For example, you could add div: 'map1', to the main_settings of the mapdata1.js file and div: 'map2', to the main_settings of the mapdata2.js file. These values can be whatever you like, but they must correspond to the ids of divs that you have created on the page. So, in this example, your HTML should contain:
Add jQuery to your page by embedding a local copy of jQuery or using the jQuery CDN (shown below):
Use the ajax attribute of jQuery to load the different mapdata.js files and load the map like this:
For an example, check out the demo we've put together using the HTML5 US map. (Note: If you download the demo, you must upload it to a server for it to work properly).
© Simplemaps.com 2010-2015 | License | Privacy Policy | Releases | Testimonials | Resources | Documentation
Deprecated Maps: Flash USA Map | Flash World Map | Flash Canada Map | Flash Europe Map | Flash Congress Map
Formerly FlashUSAmap.com and Flashworldmap.com