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

Visualization: Map doesn't work with addresses #2423

Open
myn01 opened this issue Dec 24, 2016 · 0 comments
Open

Visualization: Map doesn't work with addresses #2423

myn01 opened this issue Dec 24, 2016 · 0 comments

Comments

@myn01
Copy link

myn01 commented Dec 24, 2016

The first example at https://developers.google.com/chart/interactive/docs/gallery/map works well because it has named locations (countries)
If you replace one location with an address, it won't work from a webserver. It works from a local file, but from a webserver it doesn't work.

Since it works with Lat-Long, should I convert each address to its Lat-Long equivalence?

How can I solve this?

Try:

`

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script> google.charts.load('upcoming', { 'packages': ['map'] }); google.charts.setOnLoadCallback(drawMap);
function drawMap() {
  var data = google.visualization.arrayToDataTable([
    ['Address', 'Text'],
    ['800 e washington st, Colton, CA, USA', 'CA']
  ]);

var options = {
  showTooltip: true,
  showInfoWindow: true
};

var map = new google.visualization.Map(document.getElementById('chart_div'));

map.draw(data, options);

};
</script>

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

No branches or pull requests

1 participant