Hi,
I have a problem i use a mapbox map and 4 customs map
my principap map is mapView is first add
mport Mapbox
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let mapView = MGLMapView(frame: view.bounds)
mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
mapView.setCenter(CLLocationCoordinate2D(latitude: 40.74699, longitude: -73.98742), zoomLevel: 9, animated: false)
view.addSubview(mapView)
}
}
and i insert customs map with mapView.addSubview(layerView)
layerView = MGLMapView(frame: view.bounds)
layerView.styleURL = URL(string: styleMapboxView)!
layerView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
layerView.setCenter(localisationCenterMap, zoomLevel: zoomLevelMap, direction : directionMap, animated: false)
layerView.tag = layerMapbox
layerView.delegate = self
mapView.addSubview(layerView)
The problem is the last layer used for gesture , and mapView not translate (only front last map)
Normally i insert my LayerView in mapview and if i zoom or pan map all layer are deplaced but not and map and custom map is unsynchronised
How lock all new layer on standard map for gesture translate, rotation, zoom ... ?? and gesture on all layer not on the front layer
Have you a solution please ?
Thanks a lot !