Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

India states map in Google geomaps

I would like to create a interactive geo map. I have already created world map as

region: 'world',
displayMode: 'regions'

And also created a map for india as markers

region: 'IN',
domain: 'IN',
displayMode: 'markers',

Now I need to create a map for india as regions instead of markers.
Now here is the problem with markers:-

I have successfully created it but there are some states which missing in that like uttarakhand, chhatisgarh and telangana. Can anyone help with that, here is the link to jsfiddle which is showing the map for indian states fiddle for map

like image 626
Rakeschand Avatar asked Oct 30 '25 00:10

Rakeschand


1 Answers

The map works, but some names can be wrong. I recommend you to use the ISO codes to avoid those problems: https://en.wikipedia.org/wiki/ISO_3166-2:IN

You can create the data in this way:

  var data = google.visualization.arrayToDataTable([
    ['State Code', 'State', 'Population'],
    ['IN-UT', 'Uttarakhand', 10116752],
    //rest of states
  ]);

Fiddle

Tell me if it helps you.

like image 122
Mikel Avatar answered Nov 01 '25 15:11

Mikel