0
J'ai un petit problème.Fichier JSOn local dans Googlechart "Map"
Mon plan est d'afficher un GeoJSON (en tant que JSON stocké localement) dans un graphique Google ('Map Chart'). De plus mon présent code JS:
google.charts.load('current', { 'packages': ['map'],"mapsApiKey": "AIzaSyD-
9tSrke72PouQMnMX-a7eZSW0jkFMBWY" });
google.charts.setOnLoadCallback(drawMap);
function drawMap() {
var jsonData=$.ajax({
url:'json',
dataType:'json',
async:false
}).reponseText;
var data= new google.visualization.DataTable(jsonData);
var options = {
showTooltip: true,
showInfoWindow: true,
icons: {
default: {
normal: 'https://icons.iconarchive.com/icons/danieledesantis/playstation-flat/48/playstation-circle-icon.png',
selected:'https://icons.iconarchive.com/icons/danieledesantis/playstation-flat/72/playstation-circle-icon.png'
}
}
};
var map = new google.visualization.Map(document.getElementById('chart_div'));
map.draw(data, options);
};
Qui peut me aider ou indiquer une autre possibilité?
'J'ai un petit problème' - vous semblez avoir oublié de dire quel est le problème -' async: false' - ne faites pas ça –