L.esri.WebMap icon indicating copy to clipboard operation
L.esri.WebMap copied to clipboard

What is the best way to render a feature layer using drawingInfo in Webmap JSON?

Open ynunokawa opened this issue 8 years ago • 3 comments

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

ynunokawa avatar Jun 20 '16 03:06 ynunokawa

just to clarify, it sounds like you are proposing:

  • that L.esri.featureLayer should accept either a GeoJSON feature collection or a url 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?

jgravois avatar Jun 20 '16 19:06 jgravois

Yes, that's right.

ynunokawa avatar Jun 20 '16 23:06 ynunokawa

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.

ynunokawa avatar Jun 21 '16 03:06 ynunokawa