3 Replies - 2329 Views - Last Post: 28 October 2011 - 06:22 AM

#1 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 349
  • Joined: 12-September 08

bing map pushpin issue

Posted 16 October 2011 - 07:23 AM

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

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

Is This A Good Question/Topic? 0
  • +

Replies To: bing map pushpin issue

#2 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 172
  • View blog
  • Posts: 1,928
  • Joined: 13-October 07

Re: bing map pushpin issue

Posted 16 October 2011 - 10:52 AM

The push pin on the map shows up for me.

I used google chrome
Was This Post Helpful? 0
  • +
  • -

#3 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 349
  • Joined: 12-September 08

Re: bing map pushpin issue

Posted 16 October 2011 - 11:32 AM

View Postcalvinthedestroyer, on 16 October 2011 - 10:52 AM, said:

The push pin on the map shows up for me.

I used google chrome


Do you understand my code??
and i did a trick in doing this but it is not a proper way to doing this.
by seeing the code can you tell me is it correct or
if you can help me with this then i can rollback the code to show you the problem.
Was This Post Helpful? 0
  • +
  • -

#4 calvinthedestroyer  Icon User is offline

  • D.I.C Lover

Reputation: 172
  • View blog
  • Posts: 1,928
  • Joined: 13-October 07

Re: bing map pushpin issue

Posted 28 October 2011 - 06:22 AM

No, I didn't understand the code. When I saw that the push pin is showing up I figured you had solved the problem.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1