Change cursor style of pushpin on mouse over RRS feed

  • Question

  • Hello,
    I have added tow bing map using javascript on page.
    What it does is display pushpin or region based on the data.
    I have created the div dynamically that is containing the map.
    I have added mouseover event for pushpin that change the cursor style.
    If there is only one map on page it is working correctly and changing the cursor style.
    If there are two maps on page the second map pushpins only change the cursor style and the first map pushpins doesnt.
    Seems like the second map is overriding the first one.
    Stangely, when I put alert in event for mouseover or mouseout on pushpin and mouse over on first map pushpins the alert is getting displayed but the cursor style doesn't change to one I want.
    Please tell how to do this.
    Wednesday, February 6, 2013 5:53 AM


  • The proper way to change the cursor of a pushpin is to use CSS and set the typeName property on the pushpin. Changing the cursor using JavaScript would mean you are accessing the undocumented parts of the generated HTML of the pushpin. Doing that is unsupported and will always cause you issues. http://msdn.microsoft.com/en-us/library/gg427629.aspx


    • Marked as answer by sa.sa Thursday, February 7, 2013 6:20 AM
    Wednesday, February 6, 2013 1:56 PM