L.esri.WebMap
L.esri.WebMap copied to clipboard
What is the best way to render a feature layer using drawingInfo in Webmap JSON?
I think that feature layers to include a feature collection with drawingInfo
should be rendered using Esri Leaflet Renderers in the issue #32 .
The goal of this concept is that all feature layers use the same logic as Esri Leaflet Renderers to render.
There are prospected requirements to perform it.
- [x] Esri Leaflet Renderers can refer original metadata with
drawingInfo
- [x] It renders
FeatureCollection
using renderer modules of Esri Leaflet Renderers (for the present) - [ ] L.esri.FeatureLayer can refer a feature collection
just to clarify, it sounds like you are proposing:
- that
L.esri.featureLayer
should accept either a GeoJSON feature collection or aurl
in its constructor? - esri-leaflet-renderers is able to interpret
drawingInfo
passed in the object constructor and skip fetching information about symbology from the service itself entirely?
is that correct?
Yes, that's right.
esri-leaflet-renderers is able to interpret drawingInfo passed in the object constructor and skip fetching information about symbology from the service itself entirely?
I have updated to rewrite drawingInfo
from the service with original drawingInfo
in esri-leaflet-renderers and created PR. :octocat:
It use new drawingInfo
option of L.esri.FeatureLayer
as the below.
L.esri.featureLayer({
url: 'http://...',
drawingInfo: webmapJson.***.drawingInfo
});
Please check it out.