Google GeoChart Visualization API - city plotting in wrong location -


For the site I'm working on, "San Francisco" is putting a marker in Louisiana in a Google GeoChart View. I have tried to convert it to "San Francisco, CA" and even "San Francisco, CA, United States" and it's still to be hidden in Louisiana.

You can see the wrong marker here:

Part of my code:

  var data = new google.visualization.DataTable (); Data.addColumn ('string', 'slug'); Data.addColumn ('string', 'city'); Data.addColumn ('number', 'value'); Data.addColumn ({type: 'string', role: 'tooltip', p: {html: true}}); / * Location * / data.Adrawaw ([[London, London, 1, '' h1 class = "tooltip-H1"> London ]], [ London, London, 1, & lt; h1 class = 'tooltip-h1 "& gt; London & lt; / h1 & gt;'], ['New York-City', 'New York City ', 1,' & lt; h1 class = "Tooltip-H1" & gt; New York City & lt; / h1 & gt; '], [' San Francisco-2 ',' San Francisco ', 1, & lt; h1 class = "tooltip-h1"> San Francisco ], ['San Francisco-2', 'San Francisco', 1, 'and' L '; H1 class = " Tooltip-H1 "> San Francisco  '],]);   

Aji Part of other cities are plotting just fine (London and NYC)

Not sure why SF is crappy.

You are using san-francisco-2 , but you use either San Francisco as your code Should or ISO code: US-CA therefore:

  data.addRows ([['London', 'London', 1, '& lt; H1 class = "tooltip-h1" & gt; London & lt; / H1> '], [' London ',' London ', 1,' & lt; H1 class = "tooltip-h1" & gt; London & lt; / H1> '], [' New York-City ',' New York City ', 1,' & lt; H1 class = "tooltip-h1" & gt; New York City & lt; / H1> '], [' San Francisco ',' San Francisco ', 1,' & lt; H1 class = "tooltip-h1" & gt; San Francisco & lt; / H1> '], [' San Francisco ',' San Francisco ', 1,' & lt; H1 class = "tooltip-h1" & gt; San Francisco & lt; / H1> '],]);    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -