MapImageLayer in Esri Leaflet

1109
2
Jump to solution
08-20-2019 01:25 PM
NathanielEvatt
New Contributor III

I was wondering if there is any plans to incorporate MapImageLayers into Esri Leaflet. 

 

In theory, it would seem possible since according to the docs 'MapImageLayer processing is handled by the server, not the client.'  I know that the 'Dynamic Map Layer' does many similar things, but the 'MapImageLayer' in Esri Js API 4.x seems to be significantly more powerful.

 

Specifically, I love the 'renderer' and 'definitionExpression' in the 'MapImageLayer' 4.x functionality, which I can't find equivalents for in the 'Dynamic Map Layer'.  

 

Any chance this could end up in Esri Leaflet?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
NathanielEvatt
New Contributor III

Hi Gavin,

Yes, you are correct.  I was aware of the DynamicMapLayer, but I didn't see the ability to control the image server output.  

The solution was to edit the `dynamicLayers` options, specifically `drawingInfo`
```

dynamicMapLayer.setDynamicLayers([{

    ... "drawingInfo": { ... }

}]);

```

And for anyone else trying to get more information on what `drawingInfo` syntax looks like you can refer the Web Map Specification drawingInfo | ArcGIS for Developers 

Maybe I will create a Pull Request to add an example to the ESRI Leaflet Repo.  Do you accept Pull Requests?

View solution in original post

0 Kudos
2 Replies
GavinRehkemper
Esri Contributor

Hi Nathaniel,

I think Esri Leaflet does cover this use case for adding layers based on MapService endpoints - in Esri Leaflet it's called L.esri.DynamicMapLayer. Please review that link and let me know if it's what you need. Example here.

Thanks!

0 Kudos
NathanielEvatt
New Contributor III

Hi Gavin,

Yes, you are correct.  I was aware of the DynamicMapLayer, but I didn't see the ability to control the image server output.  

The solution was to edit the `dynamicLayers` options, specifically `drawingInfo`
```

dynamicMapLayer.setDynamicLayers([{

    ... "drawingInfo": { ... }

}]);

```

And for anyone else trying to get more information on what `drawingInfo` syntax looks like you can refer the Web Map Specification drawingInfo | ArcGIS for Developers 

Maybe I will create a Pull Request to add an example to the ESRI Leaflet Repo.  Do you accept Pull Requests?

0 Kudos