ynunokawa / L.esri.WebMap

A leaflet plugin to display ArcGIS Web Map.
MIT License
22 stars 21 forks source link

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

Open ynunokawa opened 8 years ago

ynunokawa commented 8 years ago

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.

jgravois commented 8 years ago

just to clarify, it sounds like you are proposing:

is that correct?

ynunokawa commented 8 years ago

Yes, that's right.

ynunokawa commented 8 years ago

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.