我现在正在使用这个 JSON 链接来访问数据,如果我将鼠标悬停在特定标记上,我想访问地名!
$.getJSON('http://anyorigin.com/get?url=https%3A//maps.googleapis.com/maps/api/place/nearbysearch/json%3Flocation%3D-33.8670522%2C151.1957362%26radius%3D5000%26types%3Dfood%26name%3Dharbour%26sensor%3Dfalse%26key%3DAIzaSyAYMqH361IS1S9SA4atjBPCDlLpJ4mr6Sw&callback=?', function (data) {
var responseData = data.contents;
});
events: {
mouseover: function (marker, event, context) {
console.log(responseData.results[this].name)
}
},