Customize tiles - Esri Leaflet

316 views Asked by At

I'm using the last version of Esri Leaflet with labels:

L.esri.basemapLayer('ImageryLabels').addTo(map);

example

How can I customize the labels layer? For example, I'd like to change the font or the color.

3

There are 3 answers

0
john gravois On

@camilo is right. if you snoop the web traffic you'll see that you are fetching mostly transparent cached raster tiles with labels burned in. because of this it's not possible to customize them on the client-side.

example: http://server.arcgisonline.com/arcgis/rest/services/Reference/World_Boundaries_and_Places/MapServer/tile/1/0/0

0
Camilo On

You might use a vector tile service (Vector.Layer) as described in the API.

Then, you can create a custom vector basemap.

0
vivek shukla On

You can not change the size or color of the font on the client side, as this is a preprocessed data on the server which gets rendered on the client side.

You should consider to published your own tiled service with required font or color.