Hello, I want to overlay a tif image on my Esri Leaflet map. I had tried creating a web layer (Layer type: tile) and overlaying it but this returned a 404 error. This is the tile layer created by me: https://tiles.arcgis.com/tiles/x5wCko8UnSi4h0CB/arcgis/rest/services/HAND_Raster/MapServer
I tried to overlay this layer with L.esri.tiledMapLayer function. Is creating a web layer and overlaying it the correct method to overlay raster data? If no, how can I overlay a raster? If yes, what I might have done wrong to overlay it?
Hi, thank you for the question.
It looks like your service's spatial reference is 4269. Note on the L.esri.TiledMapLayer documentation page:
Your map service must be published using the Web Mercator Auxiliary Sphere tiling scheme (WKID 102100/3857) and the default scale options used by Google Maps, Bing Maps and ArcGIS Online. Esri Leaflet will not support any other spatial reference for tile layers.
https://developers.arcgis.com/esri-leaflet/api-reference/layers/tiled-map-layer/
So, please publish your tiled service following those requirements, then you can use L.esri.TiledMapLayer.
Thanks!