'Simon Banton' via Google Visualization API
2016-08-27 20:50:56 UTC
Yes, it's an old version (OS X 10.6 Snow Leopard) but Safari 5.1.10 is
failing to display any of the examples
at https://google-developers.appspot.com/chart/interactive/docs/gallery/map
I encountered this when trying to work out why my own code was working
perfectly in Chrome and FF but failing to display in Safari - I'd thought
it was something local to my setup so went back to the original Gallery
examples and was surprised to encounter the same issue. I remember the
examples working across all these browsers when I began my project in March
this year.
The minimal implementation of my code which demonstrates the problem is
online here:
http://web.org.uk/tmp/barrowmap/minimal.html
... code copied in below in case anything obvious jumps out to anyone here.
<html>
<head>
<script type="text/javascript"
src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
// For this minimal example, I have removed my API key which means the
Console
// will report a NoApiKeys warning.
// My actual live code uses the following two lines:
// var myMapsApiKey = 'xxxxxxxxxxxxxxx';
// google.charts.load("45", {packages:["map"], mapsApiKey:myMapsApiKey});
google.charts.load("45", {packages:["map"]});
google.charts.setOnLoadCallback(drawVisualization);
var query;
var options = {
mapType: 'satellite',
showTip: true,
useMapTypeControl: true,
};
function drawVisualization() {
query = new google.visualization.Query(
'https://docs.google.com/spreadsheets/d/1sXhQ3vqF6uEzj4mz3VHT5Mb02ZYn42oEEvvA5x3Z2Cg/edit'
);
query.setQuery('Select A,B,I where A is not null');
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
var data = response.getDataTable();
var container = document.getElementById('map_div');
var visualization = new google.visualization.Map(container);
visualization.draw(data, options);
}
</script>
</head>
<body>
<div id="map_div" style="height: 100%"></div>
</body>
</html>
Suggestions as to a fix for this non-display problem (apart than "upgrade
your OS", there are reasons why that's not possible right now) would be
very welcome.
Cheers
S.
failing to display any of the examples
at https://google-developers.appspot.com/chart/interactive/docs/gallery/map
I encountered this when trying to work out why my own code was working
perfectly in Chrome and FF but failing to display in Safari - I'd thought
it was something local to my setup so went back to the original Gallery
examples and was surprised to encounter the same issue. I remember the
examples working across all these browsers when I began my project in March
this year.
The minimal implementation of my code which demonstrates the problem is
online here:
http://web.org.uk/tmp/barrowmap/minimal.html
... code copied in below in case anything obvious jumps out to anyone here.
<html>
<head>
<script type="text/javascript"
src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
// For this minimal example, I have removed my API key which means the
Console
// will report a NoApiKeys warning.
// My actual live code uses the following two lines:
// var myMapsApiKey = 'xxxxxxxxxxxxxxx';
// google.charts.load("45", {packages:["map"], mapsApiKey:myMapsApiKey});
google.charts.load("45", {packages:["map"]});
google.charts.setOnLoadCallback(drawVisualization);
var query;
var options = {
mapType: 'satellite',
showTip: true,
useMapTypeControl: true,
};
function drawVisualization() {
query = new google.visualization.Query(
'https://docs.google.com/spreadsheets/d/1sXhQ3vqF6uEzj4mz3VHT5Mb02ZYn42oEEvvA5x3Z2Cg/edit'
);
query.setQuery('Select A,B,I where A is not null');
query.send(handleQueryResponse);
}
function handleQueryResponse(response) {
if (response.isError()) {
alert('Error in query: ' + response.getMessage() + ' ' +
response.getDetailedMessage());
return;
}
var data = response.getDataTable();
var container = document.getElementById('map_div');
var visualization = new google.visualization.Map(container);
visualization.draw(data, options);
}
</script>
</head>
<body>
<div id="map_div" style="height: 100%"></div>
</body>
</html>
Suggestions as to a fix for this non-display problem (apart than "upgrade
your OS", there are reasons why that's not possible right now) would be
very welcome.
Cheers
S.
--
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 google-visualization-api+***@googlegroups.com.
To post to this group, send email to google-visualization-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/8e712bf9-1862-4c24-9bc6-44868f78fc79%40googlegroups.com.
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 google-visualization-api+***@googlegroups.com.
To post to this group, send email to google-visualization-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/8e712bf9-1862-4c24-9bc6-44868f78fc79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.