Tiles layer link to azure blob storage

Dalmas, Jocelyn 0 Reputation points
2023-04-11T08:21:07.9466667+00:00

Hello, I would like to have authenticated access to a static X/Y/Zoom tile layer I store on an Azure storage.
The tileURL should look something like following:

https://storageaccountName.blob.core.windows.net/containerName{z}/{x}/{y}.png'

I test the url with static value and it works but layers does not appear in the maps . The goal is to host the map in a web app or powerbi Do you know if its possible to link to storage or there is an other solution to do so? Thanks for your help.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
833 questions
{count} votes

1 answer

Sort by: Most helpful
  1. rbrundritt 20,836 Reputation points Microsoft Employee Moderator
    2023-04-11T14:03:58.19+00:00

    It's possible to link to tiles in blob storage, I do this a lot. The key thing is you need to enable CORs. Here's how to do this:

    1. Go to the blob storage account resource in the Azure portal that will be hosting your files. For your URL format, make sure you have the correct folder structure folder Z -> folder Y -> file name X.png. Alternatively, give your files quadkey names and then you can just drop them into a single folder.
    2. Under Settings, click on the Resource Sharing (CORs) button.
    3. Under the Blob services section, add new entry with the following options:
    Allowed origins Allowed methods Allowed headers Exposed headers Max age
    * GET * * 360000
    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.