Bing Maps development mouse problem RRS feed

  • General discussion

  • Hi all,

    i have a "little" problem with the Bing Map...

    i'm using this library version

    <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>

    I have implemented the map inside a huge web portal created with asp.net 3.5 and Ajax + Jquery.

    In a specific layer of the website i have bind and unbind the mouse move event, using jquery function for move some other div on the screen, and all work properly...But after i open a layer with the Bing Maps with some pushpin, all the previus functions doesn't work properly...(the mouse move event cacth the event, but in the event coordinates i found the same result...)

    To initialize the map i use these line of code :


      var map = new VEMap("myMap");<br/>
      map.LoadMap(new VELatLong(45.23337675057045, 9.186222553253168), 15);<br/>


    When i close the map layer i use these line of code :


    if (map != null) {
        map.DetachEvent("onmousemove", GetCurrentMouseLatLon);
        map.DetachEvent("onclick", PixelClick);
        map = null;


    The problem is :

    After i have disposed the map object, i think that Bing Maps don't release correctly the mouse events, because when i re-bind again the mousemove event into mine function, i get from the browser the same coordinates when i move the mouse...(for example i get x:60 y:400 forever, without any changes after moving the mouse)

    I'm sorry for my bad english! :)




    Thursday, December 16, 2010 2:10 PM

All replies

  • Hello Daniele

    Are you getting the same co-ordinates after you open a layer on the Bing Maps with some pushpins or when you close the map application, re-open it again with new map object ?



    Tuesday, January 4, 2011 1:16 AM