0

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 Answers 3

0

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

Then, you can create a custom vector basemap.

0

@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

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.