Clickable world map that returns a reliable country code 3166-1-alpha-2

I want to make a world map with a click, which, when a user clicks on a country, directs the user to a URL containing the corresponding country code.

For example, you click on the UK and direct you to ... /country.php? c = GB

What would be the best way? html imagemaps? Javascript? flash? Are there any scripts there? Is there any way to use google maps?

+4
source share
4 answers

You can create such a clickable drawing using SVG.

0
source

It is very easy to implement what you want with the jVectorMap library. To determine the action by clicking a country, use the onRegionClick parameter. The ISO country code is available as a second parameter in the callback.

0
source

I would, if I could, suggest checking out the Highmaps from the people behind Highcharts (including me). It is free for non-commercial use, works great with mobile browsers (full touch support) and legacy IE prior to IE6. It supports advanced dynamic features such as sweep and rich tooltips, and is highly customizable.

We supply a collection of maps with over 350 maps, including several versions of world maps using the built-in metadata ISO-3166-1-alpha-2.

Population history by countryDrainage basin of the Meuse river

0
source

All Articles