none
Ajax7 Need a map Loaded event RRS feed

  • Question

  • It seems that the map fails when certain other things occur in the dom while it's still loading.

    I was wondering if we could have a map loaded event so that we may perform other actions only after the map is completely loaded.


    Jonathon
    • Moved by Ricky_Brundritt Friday, March 9, 2012 6:00 PM (From:Bing Maps: Map Control and Web services Development)
    Monday, February 7, 2011 3:11 PM

Answers

All replies

  • You could tie to the viewchange event. I believe this gets fired when the map is loaded.
    Windows Live Developer MVP - http://rbrundritt.spaces.live.com | http://inknowledge.co.uk
    Friday, February 11, 2011 3:42 PM
  • Nope doesn't do the trick with regard to setting the heading on a map.
    Jonathon
    Monday, February 14, 2011 1:11 AM
  • I just looked at some code I written for Bing MAps V7 and found that I didn't need a map loaded event as the map gets created in that same call as I create the map object. In v6.3 there was a VEMap.Load method which meant you can delay the loading of your map. Do you have any issue just adding your code right after you create an instance of your map?

    Windows Live Developer MVP - http://rbrundritt.spaces.live.com | http://inknowledge.co.uk
    Monday, February 14, 2011 1:30 PM
  • One of the problems I have is in this thread:

    http://social.msdn.microsoft.com/Forums/eu/vemapcontroldev/thread/ec5790cf-cff5-445f-9b6a-425234cca139

    Another weird and wonderful thing I'm experiencing in I.E. is that if I load any images unrelated to the map that have static urls as opposed to relative urls, the map fails to load. So I was considering loading the images dynamically with jquery after the map had finished loading. Hopefully this crazy bug won't be in the next version...


    Jonathon
    Tuesday, February 15, 2011 4:08 PM
  • Just to follow up for others who may stumble on this post. Look at using modules http://msdn.microsoft.com/en-us/library/hh125837.aspx
    Windows Live Developer MVP - http://rbrundritt.wordpress.com | http://inknowledge.co.uk
    Tuesday, June 7, 2011 12:57 PM