bing 地图图钉

发布于 2024-12-10 17:44:48 字数 2116 浏览 0 评论 0原文

当我的 bing 地图加载时,图钉不可见。 当我移动或单击地图时,它突然显示图钉。 我正在使用具有正确路径的自定义图钉。

进入链接,单击右侧栏绿色按钮上的发射卫星。地图加载。 http://tinyurl.com/3z25amr

我的代码

function geocodeCallback(result) {
 document.getElementById('post-satellite-map-address').firstChild.nodeValue = result.resourceSets[0].resources[0].address.addressLine;
}

jQuery('#post-gallery a[rel="post-gallery-photo"]').colorbox();

(function() {
 var icon;
 var map = new VEMap('post-satellite-map');
 var mapDiv = document.getElementById('post-satellite-map');
 var interval = setInterval(function() {
  if(mapDiv.attachEvent != undefined) {
   clearInterval(interval);

   var lat = document.getElementById('post-satellite-map-lat').value, long = document.getElementById('post-satellite-map-long').value;
   var position = new VELatLong(lat, long);
   map.LoadMap();
   map.SetZoomLevel(19);
   map.SetCenter(position);
   map.SetMapStyle(VEMapStyle.Birdseye);

   icon = new VEShape(VEShapeType.Pushpin, position);
   icon.SetCustomIcon(document.getElementById('post-satellite-map-icon').value);
   map.AddShape(icon);

   /*var script = document.createElement('script');
   script.setAttribute('type', 'text/javascript');
   script.setAttribute('src', ['http://dev.virtualearth.net/REST/v1/Locations/point?output=json&jsonp=geocodeCallback&includeEntityTypes=Address&point=', lat, ',', long].join(''));
   document.body.appendChild(script);*/
  }
 }, 10);
 document.getElementById('post-gallery-satellite').onclick = document.getElementById('sidebar-map-launch').onclick = function() {
  jQuery.colorbox({inline: true, href: '#post-satellite-map-overlay'});
  map.Resize();
  icon.Hide();
  icon.Show();

      return false;
     };

 jQuery.get(
  WPAjaxURL,
  { action: 'osm_postviews', postID: document.getElementById('post-id').value },
  function(views) {
   document.getElementById('post-views-count').firstChild.nodeValue = document.getElementById('post-satellite-map-views-count').firstChild.nodeValue = views;
  },
  'json'
 );
})();

请帮助我解决这个问题。 提前致谢

when my bing map loads push pin is not visilble.
When i move or click on map it suddenly display pushpin.
i am using custum pushpin with correct path.

Got to the link click on launch satellite on right sidebar green button.A map load.
http://tinyurl.com/3z25amr

my code

function geocodeCallback(result) {
 document.getElementById('post-satellite-map-address').firstChild.nodeValue = result.resourceSets[0].resources[0].address.addressLine;
}

jQuery('#post-gallery a[rel="post-gallery-photo"]').colorbox();

(function() {
 var icon;
 var map = new VEMap('post-satellite-map');
 var mapDiv = document.getElementById('post-satellite-map');
 var interval = setInterval(function() {
  if(mapDiv.attachEvent != undefined) {
   clearInterval(interval);

   var lat = document.getElementById('post-satellite-map-lat').value, long = document.getElementById('post-satellite-map-long').value;
   var position = new VELatLong(lat, long);
   map.LoadMap();
   map.SetZoomLevel(19);
   map.SetCenter(position);
   map.SetMapStyle(VEMapStyle.Birdseye);

   icon = new VEShape(VEShapeType.Pushpin, position);
   icon.SetCustomIcon(document.getElementById('post-satellite-map-icon').value);
   map.AddShape(icon);

   /*var script = document.createElement('script');
   script.setAttribute('type', 'text/javascript');
   script.setAttribute('src', ['http://dev.virtualearth.net/REST/v1/Locations/point?output=json&jsonp=geocodeCallback&includeEntityTypes=Address&point=', lat, ',', long].join(''));
   document.body.appendChild(script);*/
  }
 }, 10);
 document.getElementById('post-gallery-satellite').onclick = document.getElementById('sidebar-map-launch').onclick = function() {
  jQuery.colorbox({inline: true, href: '#post-satellite-map-overlay'});
  map.Resize();
  icon.Hide();
  icon.Show();

      return false;
     };

 jQuery.get(
  WPAjaxURL,
  { action: 'osm_postviews', postID: document.getElementById('post-id').value },
  function(views) {
   document.getElementById('post-views-count').firstChild.nodeValue = document.getElementById('post-satellite-map-views-count').firstChild.nodeValue = views;
  },
  'json'
 );
})();

Please help me in this issue.
thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尝蛊 2024-12-17 17:44:48

这是 Bing 地图 V6.3 鸟瞰视图中的一个已知问题。解决此问题的两个选项是,以编程方式移动地图少量以触发地图的重绘,或者升级到 Bing Maps v7 控件

This is a known issue when in Birdseye view in Bing Maps V6.3. Two options to get around this is to either move the map programmatically a small amount to trigger the redraw of the map, or upgrade to the Bing Maps v7 control

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文