none
Polyline & pushpin anti-merdian RRS feed

  • Question

  • Hi everyone,

     

    i have a problem with bing maps v7  i have one polyline and 2 pushpin (one for my start and one for end) but strange result with my pushpins

     


    • Edited by Julien Romagnoli Sunday, October 2, 2011 9:19 PM
    • Moved by Ricky_Brundritt Saturday, March 10, 2012 11:16 AM (From:Bing Maps: Map Control and Web services Development)
    Sunday, October 2, 2011 9:15 PM

Answers

  • Well, you've zoomed out so far that the map projection has wrapped around and there are two locations matching your possible endpoint - the polyline has snapped to one, while the pushpin has snapped to to the other.

    Try zooming in.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Sunday, October 2, 2011 9:34 PM
    Moderator

All replies

  • Well, you've zoomed out so far that the map projection has wrapped around and there are two locations matching your possible endpoint - the polyline has snapped to one, while the pushpin has snapped to to the other.

    Try zooming in.


    twitter: @alastaira blog: http://alastaira.wordpress.com/
    Sunday, October 2, 2011 9:34 PM
    Moderator
  • Hi,

    i zoom & center with my polylines like that

     

    setCenterAtAll: function(){
    	var polygon = null;
    	var locations = new Array();
    	for(var i=0; i<this.map.entities.getLength(); i++){
    		polygon = this.map.entities.get(i);
    		if(polygon instanceof Microsoft.Maps.Polyline) {
    			locations.push(polygon.getLocations());
    		}
    	}
    	this.map.setView({
    		bounds: Microsoft.Maps.LocationRect.fromLocations(locations[0])
    	});
    }
    


     

    Tuesday, October 4, 2011 6:06 AM