Custom styling of the base map is not yet supported, but planned for the future.
I would avoid trying to do anything around modifying that file as it is likely to break (we plan on revamping how base map styles are structured in the SDK soon).
That said, there it is possible to do custom styling today in a supported way. It is a bit more work.
- You can use this with the blank or blank_accessible map styles to
- A fully supported method is to create an instance of the VectorTileSource class and load in the base map tiles directly:
datasource = new atlas.source.VectorTileSource(null, {
tiles: ['https://{azMapsDomain}/map/tile?api-version=2.0&tilesetId=microsoft.base&zoom={zoom}&x={x}&y={y}')],
maxZoom: 22
});
The cool thing here is the {azMapsDomain} placeholder will tell the map control to align the domain of the request to the same one specified in the map control. This makes it easy to create code the works in both the public and government cloud versions of Azure Maps. It also provides the helpful task of taking care of authentication for you.
- Once you have a vector tile source, you can then use this with rendering layers (i.e. LineLayer). However you will need to specify the sourceLayer option of the layer to tell it which data in the vector tile to render. The list of source layers can be found here: https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile From there, you can use the rendering layer like any of the code samples.
This works well for simple styles, but for complex styles, it would be a lot of work, thus why we haven't yet released official support for custom styling.
Here are some samples that use the vector tile traffic data: https://azuremapscodesamples.azurewebsites.net/index.html#Vector-tiles