Summary
First I add GeoJsonLayer without features to map. Then I continiously add features using GeoJsonLayer.addFeature() and all the features are appearing on the map. Next I try to call GeoJsonFeature.setPolygonStyle() on the added features, but corresponding polygons don't change their appearance.
Expected behavior
Calling GeoJsonFeature.setPolygonStyle() should redraw the feature with the given style.
Observed behavior
The feature's appearance remains the same as before.
Environment details
Library version 2.3.0
Code example
// Add layer with empty features array
val geoJsons = JSONArray()
val geoJson = JSONObject()
geoJson.put("type", "FeatureCollection")
geoJson.put("features", geoJsons)
val layer = GeoJsonLayer(googleMap, geoJson)
val style = layer.defaultPolygonStyle
style.strokeColor = Color.RED
layer.addLayerToMap()
// This will draw the feature with red stroke
layer.addFeature(geoJsonFeature)
// Changing stroke color
val style = geoJsonFeature.polygonStyle
style.strokeColor = Color.BLUE
// This line should affect the polygon appearance but it doesn't
geoJsonFeature.polygonStyle = style
I suppose that the reason is Layer.addFeature() calls improper version of underlyed renderer's addFeature() (Renderer.addFeature() instead of GeoJsonRenderer.addFeature())
Summary
First I add GeoJsonLayer without features to map. Then I continiously add features using GeoJsonLayer.addFeature() and all the features are appearing on the map. Next I try to call GeoJsonFeature.setPolygonStyle() on the added features, but corresponding polygons don't change their appearance.
Expected behavior
Calling GeoJsonFeature.setPolygonStyle() should redraw the feature with the given style.
Observed behavior
The feature's appearance remains the same as before.
Environment details
Library version 2.3.0
Code example
I suppose that the reason is Layer.addFeature() calls improper version of underlyed renderer's addFeature() (Renderer.addFeature() instead of GeoJsonRenderer.addFeature())