0
如何檢測在jquery-ui-map中關閉的infowindow並在窗口關閉後將地圖平移到中心?jquery-ui-map檢測infowindow關閉並平移到地圖中心
<pre>
$(function() {
demo.add(function() {
$('#themap').gmap({'center': '54.977614,23.871643', 'zoom': 7,'disableDefaultUI':false, 'callback': function() {
var self = this;
$.getJSON('index.php?option=com_maps&view=stendai&format=json', function(data) {
$.each(data.markers, function(i, marker) {
self.addMarker({ 'id':marker.id, 'position': new google.maps.LatLng(marker.latitude, marker.longitude),'icon':'images/stendas.png' , 'bounds':true }
).click(function() {
self.openInfoWindow({ 'content': marker.content }, this);
});
});
});
}});
}).load();
});
</pre>