Search code examples
azureazure-maps

I am trying to render an azure map into my application but the tiles seem to be repeating. How can I limit the tile so each part's rendered only once?


The tiles in Azure maps are repeating for me so that one location shows twice or thrice sometimes. I tried adjusting zoom but that had no effect. How can I limit this repetition?


Solution

  • To make sure I understand what you are describing, when zoomed out, you are seeing two or more "worlds" and your data repeated on them. This is known as world wrap. Like a globe you can spin it infinitely horizontally. There is an option to disable this:

    var map = new atlas.Map('myMap', {
        //Disable world wrap.
        renderWorldCopies: true,
    
        //Your other map options.
    });
    

    Here is a live demo of this: https://azuremapscodesamples.azurewebsites.net/?sample=Render%20world%20copies