2011-10-16 12 views
2

私のビン地図がプッシュピンをロードしているときには表示されません。 地図上を移動またはクリックすると、突然押ボタンが表示されます。 正しい経路でcustum押しピンを使用しています。bing map pushpin

右のサイドバーの打ち上げ衛星をクリックして地図を読み込みます。 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' 
); 
})(); 

この問題で私を助けてください。 ありがとうございました

答えて

0

これは、Bing Maps V6.3のBirdseyeビューでの既知の問題です。これを回避するための2つのオプションは、マップの再描画をトリガするためにプログラムでマップをわずかに移動するか、Bing Maps v7コントロールにアップグレードすることです。

関連する問題