You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
// Note: StyleLayer is a class variable
styleLayer = MGLCircleStyleLayer(layerIdentifier: "test-layer", sourceIdentifier: "sv")!
styleLayer.circleColor = UIColor.green
mapView.style().add(styleLayer)
Add a UISwitch which basically triggers the following
if (switch.isOn) {
mapView.style().add(styleLayer)
} else {
mapView.style().remove(styleLayer)
}
Removing the layer works, re-adding the layer will crash the app with the following error message:
2016-09-26 16:19:19.548301 Mapbox-iOS-Examples[892:460381] Failed to set (latitude) user defined inspected property on (UIView): [<UIView 0x101d6e8a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key latitude.
2016-09-26 16:19:19.548388 Mapbox-iOS-Examples[892:460381] Failed to set (longitude) user defined inspected property on (UIView): [<UIView 0x101d6e8a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key longitude.
2016-09-26 16:19:19.548446 Mapbox-iOS-Examples[892:460381] Failed to set (zoomLevel) user defined inspected property on (UIView): [<UIView 0x101d6e8a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key zoomLevel.
Note: I also deleted the latitude, longitude and zoomLevel attributes from the MGLMapView control and also tried to programmatically add the mapView as proposed from @1ec5 in #1184, still doesn't work.
The text was updated successfully, but these errors were encountered:
This is due to a combination of #6254 and #6096. For now, you'll need to get a fresh reference to the layer after adding it, using layerWithIdentifier(_:).
Platform: iOS
Mapbox SDK version: 3.4.0-alpha.4
Steps to trigger behavior
Note: I also deleted the latitude, longitude and zoomLevel attributes from the MGLMapView control and also tried to programmatically add the
mapView
as proposed from @1ec5 in #1184, still doesn't work.The text was updated successfully, but these errors were encountered: