Esri / geojson-layer-js

An easy way to load GeoJSON data into your ArcGIS map
Apache License 2.0
130 stars 87 forks source link

Does not expose setRenderer method #21

Closed jtroe closed 9 years ago

jtroe commented 9 years ago

No functionality for custom symbology; all symbology is tied to geometry type.

jgravois commented 9 years ago

hi @jtroe, you're definitely right that the plugin doesn't expose a public method for manipulating the renderer applied to graphics, but you can alter the renders defined in _setDefaultSymbols() to whatever else you want.

all that said, i think its a viable enhancement. pull requests welcomed!

alaframboise commented 9 years ago

Added support for geojsonlayer.render = new SimpleRenderer(json);

https://github.com/Esri/geojson-layer-js/pull/22

Closed.

jgravois commented 9 years ago

@alaframboise just reminded me that this custom layer inherits from GraphicsLayer and as such, a renderer property is exposed automatically. this is already demonstrated in the sample in commented out code.

geoJsonLayer.renderer = new SimpleRenderer(simpleJson);

i'm going to go ahead and close this issue, but if you'd like to chat about it more, i'd be happy to.