我希望通过Bing Maps实现以下功能.在#content中,标记将从
JSON显示.
有没有人有想法?我怀疑当“下载”发生错误时?
代码:
function bings_maps(){ $('#content').gmap({ center: new Microsoft.Maps.Location(47.631296,15.830868),mapTypeId: Microsoft.Maps.MapTypeId.aerial,zoom: 17,credentials: 'test',bounds: null,showMapTypeSelector: false,enableSearchlogo: false,showBreadcrumb: false,enableClickablelogo: false,showScalebar: false,showDashboard: false,showMapTypeSelector:false,useInertia: false,disablePanning: false,disableZooming: false,callback: function() { var self = this; $.getJSON('inhalt.PHP',function(data) { $.each( data.markers,function(i,marker) { var location = new Microsoft.Maps.Location(marker.latitude,marker.longitude); self.addMarker({ 'location': location,'bounds': false,'icon': marker.icon } ); }); }); }}); } function bings_maps_refresh() { $('#content').gmap('clear','markers'); $('#content').gmap({'callback':function() { this.addMarker({'location': '47.631296,15.830868','bounds': true}); }});