How to stop repeating Bing Map V8 tiles

Bala Krishna Guggilla 21 Reputation points

I have displayed a Bing Map v8 on my webpage. But, when i am panning the map, map is coming again and again from left to right or right to left. I want to stop this. I want only one map. how to achieve this functionality?.
I'm Using Microsoft.Maps.SpatialMath.getGeodesicPath to draw path between two points. Due to map repeating, showing some part on left side and other part in right side.

Thanks in advance.

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
337 questions
Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
187 questions
{count} votes

Accepted answer
  1. rbrundritt 6,921 Reputation points Microsoft Employee

    What you are seeing is called world wrap. It's kind of like being able to spin the globe. The Bing Maps V8 SDK doesn't have a specific option to disable this feature, however, you can set the maxBounds option of the map to the limits of a single "world" and it will prevent the ability to pan the map infinitely left and right, however it likely won't change how things are rendered on the map. Here is an example of setting this option when loading the map:

       var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {	  
       	maxBounds: new Microsoft.Maps.LocationRect(new Microsoft.Maps.Location(0,0), 360, 180)  
    No comments

1 additional answer

Sort by: Most helpful
  1. Clemens Schotte 181 Reputation points Microsoft Employee

    You can set the maxBounds option to set the bounding area that restricts the map view.

    No comments