Hi Diogo,

For 'markers' mode, we use Google Maps for geocoding the locations
(converting a string location to a latitude and longitude), and so
ambiguous locations may not get geocoded as you might expect. Because of
this, even though we recommend ISO 3166 codes to be used for 'regions'
mode, 'markers' mode winds up working best with longer names (like Germany,
Argentina, etc) where there is no ambiguity.

On Mon, Jun 1, 2015 at 7:42 AM Daniel Buttery <
[email protected]> wrote:

> Looks like a mixup with Country Codes that match 'regional' codes (DE =
> Delaware, AR = Arkansas).
>
> https://jsfiddle.net/23rzy5qv/
>
> GB (UK) works fine as there is no matching regional code, but SE (Sweden)
> goes to South America. Working fine if you change the country codes to
> country names, but obviously thats not what you're after. I'm sure someone
> will swing by soon and let us know if its a bug!
>
>
> On Monday, 1 June 2015 12:03:08 UTC+1, Diogo Ribeiro wrote:
>>
>> Hi guys,
>>
>> Could you help me discover why some countries are being displayed
>> incorrectly?
>>
>> I have
>>
>> google.setOnLoadCallback(drawRegionsMap);
>>       function drawRegionsMap() {
>>         var data = new google.visualization.DataTable();
>>         data.addColumn('string', 'Country');
>>         data.addColumn('string', 'Name');
>>         data.addColumn('number', 'P1');
>>         data.addRows([
>>                     ['DE','Germany', 228]                    ,
>>                     ['AR','Argentina', 53],
>>                     ['US','USA', 7746]
>>         ]);
>>       var options = {
>>         region: 'world',
>>         displayMode: 'markers',
>>         backgroundColor: '#B3D1FF',
>>         minValue: 0,  colors: ['#A1FF8E', '#008042']
>>       };
>>       var chart = new google.visualization.GeoChart(document.
>> getElementById('chart_div'));
>>       chart.draw(data, options);
>> };
>>
>>
>>
>> Both Argentina and Germany are being displayed in USA?
>>
>> Thanks in advance.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to