Reputation: 9492
I have a Mapbox map showing up to date items, which I can disable or enable on the map. Then an array id cleared, or cleared and re added.
When disabled, the items still show, when enabled, they still do not show - it just loads whatever the setting and array was at the start.
I have added this on a data update method:
self.repeaterMap.mapboxMap.updateGeoJSONSourceFeatures(forSourceId: "namedsourceGeo", features: self.featurelist)
self.repeaterMap.mapboxMap.updateGeoJSONSourceFeatures(forSourceId: "anothernamedsourceGeo", features: self.anotherfeaturelist)
and it is indeed calling, repeatedly, and the array feature list is indeed changing, the count is changing, still it does not update the map. Is there some method to re load the data source / SymbolLayer that I'm missing?
Edit - also tried setting a layer ".visibility = .constant(.visible)", as in this example, it's not working - https://docs.mapbox.com/ios/maps/examples/show-hide-layer/
Upvotes: -2
Views: 36