小编Chr*_*ber的帖子

Jquery Bings Maps Json重装

我想通过Bing Maps实现以下功能.在#content,标记将从JSON显示.

15秒后,应删除并重新加载所有标记.

加载地图和标记工作正常.同时删除标记工作.

只有在没有新标记下载后!在控制台中,我没有收到任何错误消息.

有没有人有想法?我怀疑当"下载"发生错误时?

代码:

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, 
                           enableSearchLogo: false,
                           showDashboard: false,
                           showMapTypeSelector:false,
                           showScalebar: 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  } );
      });
    });
  }}); …
Run Code Online (Sandbox Code Playgroud)

jquery jquery-plugins bing-maps

10
推荐指数
1
解决办法
433
查看次数

标签 统计

bing-maps ×1

jquery ×1

jquery-plugins ×1