havardl / greener_grass

🌤️🌿 Where is the grass greener?
https://greenergrass.netlify.com/
1 stars 0 forks source link

Keep isochrone polygon on map style change #4

Open havardl opened 4 years ago

havardl commented 4 years ago

When changing map style, the added isochrone polygon is lost. Need to make sure it persist across changes.

havardl commented 4 years ago

Seems that map.getSource(layerId) won't find the layer, so the layers might be removed on mapStyle change?

havardl commented 4 years ago

Reason and potential workaround here: https://github.com/mapbox/mapbox-gl-js/issues/6701 https://github.com/mapbox/mapbox-gl-js/issues/4006