Bing Maps API v7 Custom HTML pushpins in Firefox not positioned correctly -


i've created app use several custom html pushpins. each 1 of these pushpins has click event call setview on map center map on selected pin. works in browsers except firefox (testing version 22.0).

in firefox, after setview animation completes , map centered on pushpin, pushpin offset horizontally, vertically or both amount of pixels. amount seems correspond amount of pixels map has moved. if drag map manually mouse, upon releasing mouse button, pushpin snaps proper place. i've checked top , left position values of mappushpinbase anchor tag in compared other browsers , values differ.

unfortunately, cannot post live example because product has not yet been publicly released. see below code i'm using.

this.clickhandlers.push(microsoft.maps.events.addhandler(node, 'click', function (e) {     var element = $(e.target._htmlcontent);     self.nodehitboxhandler(element); })); 

within nodehitboxhandler function, piece of bing map code this:

this.map.setview({     center: new microsoft.maps.location(panstart.latitude, panstart.longitude),     zoom: this.zoom,     maptypeid: microsoft.maps.maptypeid[self.maptypeid] }); 

thanks in advance help.

update:

in order make things clearer, i've created simple example demonstrates problem. can see here: http://ginof.com/tests/bing/

in firefox, try clicking on different pushpins , watch behaviour of pushpin you've clicked on after map finishes panning new location. map works fine in browsers except firefox.

here's complete javascript code example:

$(document).ready(function () {     var map = null,         initialcoordinates = {latitude: 40.71435, longitude: -74.00597},         initialpoint = new microsoft.maps.location(initialcoordinates.latitude, initialcoordinates.longitude),         range = {             top: 3,             right: 5,             bottom: 0.01,             left: 5         },         mapoptions = {             credentials:"bing-maps-api-key",             disablekeyboardinput: true,             disablezooming: true,             enableclickablelogo: false,             enablesearchlogo: false,             showbreadcrumb: false,             showdashboard: false,             showmaptypeselector: false,             showscalebar: false,             inertiaintensity: 0.5,             maptypeid: microsoft.maps.maptypeid.birdseye,             labeloverlay: microsoft.maps.labeloverlay.hidden,             center: initialpoint,             zoom: 14         };      function getmap() {         // initialize map         map = new microsoft.maps.map(document.getelementbyid("mapdiv"), mapoptions);          // create nodes         map.entities.clear();         var pushpinoptions,             pushpin,             nodecoordinates;          (var = 0; < 5; i++) {             pushpinoptions = {width: null, height: null, htmlcontent: '<div id="node' + + '" class="node">' + + '. custom html</div>'};              nodecoordinates = {latitude: initialcoordinates.latitude + * 0.005, longitude: initialcoordinates.longitude + * 0.005};             pushpin = new microsoft.maps.pushpin(new microsoft.maps.location(nodecoordinates.latitude, nodecoordinates.longitude), pushpinoptions);             pushpinclick = microsoft.maps.events.addhandler(pushpin, 'click',                 (function () {                     var nodeid = i,                         homecoordinates = nodecoordinates;                     return function () {                         console.log("node " + nodeid + " clicked.");                         map.setview({center: new microsoft.maps.location(homecoordinates.latitude, homecoordinates.longitude)});                     }                 })()             );             map.entities.push(pushpin);         }     }      getmap(); }); 

thanks again help.

this known issue able reproduce has been escalated development team. note bing maps forums best place report these types of issues. can find similar thread on topic here: http://social.msdn.microsoft.com/forums/en-us/f77e6a80-2e0f-44c3-81cc-edb4c2327016/custom-html-pushpins-in-firefox-not-positioned-correctly


Comments