如何从 Json 文件中过滤 gmap 标记?
$(函数(){
演示。添加(函数(){
$('#map_canvas').gmap({'disableDefaultUI':false, 'callback': function() {
变种自我=这个;
$.getJSON('demo.asp', 函数(数据){
$.each(data.markers, function(i, marker) {
self.addMarker({ 'position': new google.maps.LatLng(marker.latitude, marker.longitude), 'bounds':true } ).click(function() {
self.openInfoWindow({ 'content': marker.content }, this);
});
});
});
}});
})。加载();
});