Zoom into Clusters (with Bing Maps) does not refresh clusters -


i followed bing maps docs zoom clusters. since microsoft embeds screenshot, here's working example. when click on cluster, notice cluster not updated. pan map little bit, , map clusters refreshed.

so either bing maps documentation broken or bing maps bug.

any idea workaround, e.g. how force map refresh after map has zoomed in?

the relevant code (which not update map/clusters) this, last line:

function clusterclicked(e) {     if (e.target.containedpushpins) {         var locs = [];         (var = 0, len = e.target.containedpushpins.length; < len; i++) {             //get location of each pushpin.             locs.push(e.target.containedpushpins[i].getlocation());         }          //create bounding box pushpins.         var bounds = microsoft.maps.locationrect.fromlocations(locs);          //zoom bounding box of cluster.          //add padding compensate pixel area of pushpins.         map.setview({ bounds: bounds, padding: 100 });     } 

this known issue has been fixed in experimental branch. can try out adding "&branch=experimental" map script url. fixes , features in experimental branch rolled main release branch @ end of july.

also, aware, there bunch of interactive code samples v8 available here: http://www.bing.com/api/maps/sdk/mapcontrol/isdk#overview


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -