Interactive maps look great and make it easy for your visitors to navigate to their region of choice with a simple click. Unfortunately, not everyone visiting your site will have a strong grasp of geography. Therefore, you might consider supplementing your map with a searchable drop down menu like this one:
This tutorial will show you how to easily add your own searchable dropdown menu using the jQuery plugin Chosen and a little bit of JavaScript. Follow these steps:
Choose the map you want to install:
Follow the standard installation instructions. This requires embedding the worldmap.js file and mapdata.js files and adding a div with the id "map" to your webpage:
Add jQuery to your page by embedding a local copy of jQuery or using the jQuery CDN (shown below):
Download the jQuery plugin Chosen and embed the chosen CSS and JavaScript files:
Add HTML for a blank dropdown with the id state_list above your map:
Add the following custom JavaScript/jQuery to your page (in the downloadable example, this can be found in the search.js file):
In plain English, the above:
Since this is a complicated example, you should download the demo and view the source files:
© 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