[BUG] Using Firefox with Virtual Earth

Firefox 2.0.0.1 (and Netscape 8.0.3.3 with 'display as Firefox' set) give the following Javascript error from the http://dev.cirtualearth.net/standard/v2/MapControl.js file:

"aw.attachEvent() is not a function"

when rendering my site:

http://www.svrsig.org/cgi-bin/ggmap.cgi

My site uses the method described in Computer Shopper to display the virtual earth map control. It works fine in IE6 (although I am told it fails in IE7 - I have ignored this for the present as I have had many people encountering bugs in IE7, like wrong pages fetched from google searches etc.).

As the error seems to be in a hidden 'DIV' created by your javascript, I am a bit stumped... Any help would be most welcome.




Answer this question

[BUG] Using Firefox with Virtual Earth

  • ssfftt

    The reference SDK is pretty good. Now amended my site to work cross browser.

    Only two gripes - Netscape (with the 'display as Firefox' option) has problems.

    Also the 'onendcontinuouspan' does not fire after a map.Pan() and there is no equivalent 'onendpan' event.



  • ashwin_k_s

    ..Which I have done - comment was just in case there are other ways of panning the map other than continuous pan and other than from user buttons/functions..

  • Harald Mejlholm

    You are using the V2 of the VE API, you need to use at least V3 or V4 with 3D.

    Then the Hack for FF2 support will work. Hopefully there will be a point release soon to fix this as local.live.com is using a newer version that does.

    John.



  • Variar

    There a quite a few breaking changes from V2 -> V3 or V4.

    For example they changed the way you initially load the map. Have a look at this upgrade to get some idea:

    http://viavirtualearth.com/vve/Articles/WhereWasDrNeilV3.ashx

    You may need to look at the SDK for the new syntax. There are many new features as well.

    John.



  • KimberlyL

    I don't think you need to do that, just stick with the previous line:

    map = new VEMap('map');

    The fix that you put in before this line (from the wiki) should take care of the rendering

  • Jehan Badshah

    I have put the suggested code before my code but get the error

    "Msn.Drawing has no properties"

    Where you have:

    map = new VEMap('map');

    I have:

    map = new Msn.VE.MapControl(document.getElementById("myMap"),params);
    map.Init();

    Any further suggestions please Incidentally I am now told it *does* work fine in IE7.



  • ACCOUNTINGONLINE.US

    it doesn't fire after map.Pan();.. But you can call your call back function in your pan() function
  • Neotech

    Tried replacing 'v2' with 'v3' and using map=new VEMap('myMap'); [the DIV in which the map appears has id="myMap"] but get the error

    'VEMap is not defined'.

    Help please.



  • rachakunta

    There's a fix for firefox 2.0 if you haven't used it already

    http://viavirtualearth.com/wiki/Firefox2.ashx

  • [BUG] Using Firefox with Virtual Earth