Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Brandenburg is not recognized #707

Open
orwant opened this issue May 9, 2015 · 5 comments
Open

Bug: Brandenburg is not recognized #707

orwant opened this issue May 9, 2015 · 5 comments

Comments

@orwant
Copy link
Collaborator

orwant commented May 9, 2015

What steps will reproduce the problem? Please provide a link to a
demonstration page if at all possible, or attach code.
1. One of the German states, i.e. Brandenburg is not recognized by the 'resolution':'provinces'
section (cp. http://code.google.com/intl/de-DE/apis/adwords/docs/appendix/provincecodes.html#Germany)
2. Code ist included below.


What component is this issue related to (PieChart, LineChart, DataTable, Query, etc)?
geochart (German "provinces")

Are you using the test environment (version 1.1)?
(If you are not sure, answer NO)
NO

What operating system and browser are you using?
Win7, Chrome 14.0


*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************

<html>
<head>
  <script type='text/javascript' src='https://www.google.com/jsapi'></script>
  <script type='text/javascript'>
   google.load('visualization', '1', {'packages': ['geochart']});
   google.setOnLoadCallback(drawRegionsMap);

    function drawRegionsMap() {
      var data = new google.visualization.DataTable();
      data.addColumn('string', 'Country');
      data.addColumn('number', 'Popularity');
      data.addRows([['Baden-Württemberg', 10],
            ['Bayern', 9],
            ['Berlin', 8],
            ['Brandeburg', 11],
            ['Bremen', 6],
            ['Hamburg', 6],
            ['Hessen', 11],
            ['Mecklenburg-Vorpommern', 5],
            ['Niedersachsen', 7],
            ['Nordrhein-Westfalen', 8],
            ['Rheinland-Pfalz', 5],
            ['Saarland', 6],
            ['Sachsen', 12],
            ['Sachsen-Anhalt', 10],
            ['Schleswig-Holstein', 5],
            ['Thüringen', 6]]);


      var options = {'title':'Verteilung in Deutschland',
  'width':650, 'height':400, 'region':'DE', 'resolution':'provinces'};

      var container = document.getElementById('map_canvas');
      var geochart = new google.visualization.GeoChart(container);
      geochart.draw(data, options);
  };
  </script>
</head>

<body>
  <div id='map_canvas'></div>
</body>

</html>

Original issue reported on code.google.com by ulrich.schroeders on 2011-10-09 21:00:32

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

Thanks, indeed this is a bug.

There is a workaround you can use in the meantime:
Replace 'Brandenburg' with {f: 'Brandenburg', v: 'DE-BB'}.
Geochart will use the cell value ('v') to identify the province ('DE-BB' is Brandenburg's
ISO_3166-2:DE code), and the formatted value ('f') to format the text shown in the
hover-card.

Original issue reported on code.google.com by ebixon@google.com on 2011-10-11 07:59:45

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

Thanks for the quick response.
Your workaround works fine. :-)

Kind regards, Ulrich

Original issue reported on code.google.com by ulrich.schroeders on 2011-10-11 22:49:39

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

How can I fix this when loading Data from a Google Spreadsheet? If I enter {f: 'Brandenburg',
v: 'DE-BB'} in the cell, it doesn't work...

Original issue reported on code.google.com by benedikt.kienzler on 2014-11-06 12:26:16

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

When using Google Charts with data coming from spreadsheets, there is no way (yet) to
specify the formatted representation of individual cells like you can as described
above.

Original issue reported on code.google.com by dlaliberte@google.com on 2014-11-06 13:18:59

@orwant
Copy link
Collaborator Author

orwant commented May 9, 2015

Here is a different workaround. The GeoChart has since been updated to be able to take
two location columns, one used for geocoding, and one used for display. In this instance,
your Brandenburg row would look like:

['DE-BB', 'Brandenburg', 11]

Original issue reported on code.google.com by grabks@google.com on 2014-11-06 14:49:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant