#map #bing
#Карта #bing
Вопрос:
когда моя карта 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=jsonamp;jsonp=geocodeCallbackamp;includeEntityTypes=Addressamp;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'
);
})();
Пожалуйста, помогите мне в этом вопросе.
заранее спасибо
Ответ №1:
Это известная проблема при просмотре с высоты птичьего полета в Bing Maps версии 6.3. Два варианта решения этой проблемы — либо переместить карту программно на небольшую величину, чтобы вызвать перерисовку карты, либо перейти на элемент управления Bing Maps версии 7