US State maps in GeoMap?

2,033 views
Skip to first unread message

gubbish

unread,
Dec 18, 2008, 5:06:23 PM12/18/08
to Google Visualization API
Hi,

was wondering if there is a way to generate US State maps using
markers with a geomap.
Google analytics has this and was wondering if it's possible to do the
same with the visualization api.
So far I have only figured out how to do this for countries. Any help
appreciated, thanks

VizGuy

unread,
Dec 21, 2008, 4:02:35 AM12/21/08
to google-visua...@googlegroups.com
But isn't it exactly what you can see in the docs in the second example at http://code.google.com/apis/visualization/documentation/gallery/geomap.html#Example?

Or maybe I misunderstood the question.

VizGuy

Adam

unread,
Dec 23, 2008, 2:28:32 PM12/23/08
to Google Visualization API
I'm guessing he means zooming in to a state level?

Let's say, in the marker example, change the options['region'] = 'US',
to options['region'] = 'California';




On Dec 21, 4:02 am, VizGuy <viz...@google.com> wrote:
> But isn't it exactly what you can see in the docs in the second example athttp://code.google.com/apis/visualization/documentation/gallery/geoma...
> ?
>
> Or maybe I misunderstood the question.
>
> VizGuy
>

gubbish

unread,
Jan 23, 2009, 5:58:13 PM1/23/09
to Google Visualization API
Sorry for the ambiguity,
adam is correct,
basically what I want to do looks like this:
<img src="http://ikashi.com/images/calmap.tiff"></img>

google analytics has this but I was not able to find any options to
set the region to a US state and use markers.
any help? thanks

Donald Richards

unread,
Mar 14, 2013, 9:43:30 AM3/14/13
to google-visua...@googlegroups.com
Did you ever find a solution? 

Sergey

unread,
Mar 14, 2013, 9:54:39 AM3/14/13
to google-visua...@googlegroups.com
Hey all, this is actually fairly easy to do in the GeoMap and GeoChart. The tricky part is that you have to specify the resolution as 'provinces', and specify the US state's ISO 3166-2 code. For example, California's code is "US-CA". You may find a list of these codes here, on Wikipedia. Good luck!

DG C

unread,
Mar 25, 2016, 11:26:10 AM3/25/16
to Google Visualization API, d...@loufreyinstitute.org
I know this is an old question but it's one of the first responses from a Google search so I'll give one solution.  I was able to display a GeoMap for a state with the following options:

   var options = {

      dataMode
: 'markers',
      region
: 'US-TX',
      resolution
: 'PROVINCES',
      colorAxis
: {
          colors
: ['#493B75', '#53748C', '#55F246', '#F7F725', '#FA2525' ],
          values
:[1, 10, 100, 1000, 10000]
       
}
   
};


    chart
= new google.visualization.GeoMap(document.getElementById(control));
    chart
.draw( dataTable, options );

Sergey

unread,
Mar 25, 2016, 11:29:18 AM3/25/16
to Google Visualization API, d...@loufreyinstitute.org
Just to update this thread for anyone who finds it:
The GeoMap is deprecated. If you have a choice, do not use the GeoMap. Use the GeoChart instead.
Reply all
Reply to author
Forward
0 new messages