From b79c661b06cc39537d4575a4300b681c204c7ffe Mon Sep 17 00:00:00 2001 From: morvagergely <51244648+morvagergely@users.noreply.github.com> Date: Tue, 3 May 2022 13:45:24 +0200 Subject: [PATCH] Remove duplicated code (#1026) --- ios/Classes/MapboxMapController.swift | 88 --------------------------- 1 file changed, 88 deletions(-) diff --git a/ios/Classes/MapboxMapController.swift b/ios/Classes/MapboxMapController.swift index b8a710b45..6fae4af39 100644 --- a/ios/Classes/MapboxMapController.swift +++ b/ios/Classes/MapboxMapController.swift @@ -621,94 +621,6 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma mapView.style?.insertLayer(layer, below: belowLayer) result(nil) - case "symbolLayer#add": - guard let arguments = methodCall.arguments as? [String: Any] else { return } - guard let sourceId = arguments["sourceId"] as? String else { return } - guard let layerId = arguments["layerId"] as? String else { return } - guard let enableInteraction = arguments["enableInteraction"] as? Bool else { return } - guard let properties = arguments["properties"] as? [String: String] else { return } - let belowLayerId = arguments["belowLayerId"] as? String - let sourceLayer = arguments["sourceLayer"] as? String - let minzoom = arguments["minzoom"] as? Double - let maxzoom = arguments["maxzoom"] as? Double - addSymbolLayer( - sourceId: sourceId, - layerId: layerId, - belowLayerId: belowLayerId, - sourceLayerIdentifier: sourceLayer, - minimumZoomLevel: minzoom, - maximumZoomLevel: maxzoom, - enableInteraction: enableInteraction, - properties: properties - ) - result(nil) - - case "lineLayer#add": - guard let arguments = methodCall.arguments as? [String: Any] else { return } - guard let sourceId = arguments["sourceId"] as? String else { return } - guard let layerId = arguments["layerId"] as? String else { return } - guard let enableInteraction = arguments["enableInteraction"] as? Bool else { return } - guard let properties = arguments["properties"] as? [String: String] else { return } - let belowLayerId = arguments["belowLayerId"] as? String - let sourceLayer = arguments["sourceLayer"] as? String - let minzoom = arguments["minzoom"] as? Double - let maxzoom = arguments["maxzoom"] as? Double - addLineLayer( - sourceId: sourceId, - layerId: layerId, - belowLayerId: belowLayerId, - sourceLayerIdentifier: sourceLayer, - minimumZoomLevel: minzoom, - maximumZoomLevel: maxzoom, - enableInteraction: enableInteraction, - properties: properties - ) - result(nil) - - case "fillLayer#add": - guard let arguments = methodCall.arguments as? [String: Any] else { return } - guard let sourceId = arguments["sourceId"] as? String else { return } - guard let layerId = arguments["layerId"] as? String else { return } - guard let enableInteraction = arguments["enableInteraction"] as? Bool else { return } - guard let properties = arguments["properties"] as? [String: String] else { return } - let belowLayerId = arguments["belowLayerId"] as? String - let sourceLayer = arguments["sourceLayer"] as? String - let minzoom = arguments["minzoom"] as? Double - let maxzoom = arguments["maxzoom"] as? Double - addFillLayer( - sourceId: sourceId, - layerId: layerId, - belowLayerId: belowLayerId, - sourceLayerIdentifier: sourceLayer, - minimumZoomLevel: minzoom, - maximumZoomLevel: maxzoom, - enableInteraction: enableInteraction, - properties: properties - ) - result(nil) - - case "circleLayer#add": - guard let arguments = methodCall.arguments as? [String: Any] else { return } - guard let sourceId = arguments["sourceId"] as? String else { return } - guard let layerId = arguments["layerId"] as? String else { return } - guard let enableInteraction = arguments["enableInteraction"] as? Bool else { return } - guard let properties = arguments["properties"] as? [String: String] else { return } - let belowLayerId = arguments["belowLayerId"] as? String - let sourceLayer = arguments["sourceLayer"] as? String - let minzoom = arguments["minzoom"] as? Double - let maxzoom = arguments["maxzoom"] as? Double - addCircleLayer( - sourceId: sourceId, - layerId: layerId, - belowLayerId: belowLayerId, - sourceLayerIdentifier: sourceLayer, - minimumZoomLevel: minzoom, - maximumZoomLevel: maxzoom, - enableInteraction: enableInteraction, - properties: properties - ) - result(nil) - case "style#removeLayer": guard let arguments = methodCall.arguments as? [String: Any] else { return } guard let layerId = arguments["layerId"] as? String else { return }