Skip to content

Commit

Permalink
Remove duplicated code (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
morvagergely authored May 3, 2022
1 parent 62650dd commit b79c661
Showing 1 changed file with 0 additions and 88 deletions.
88 changes: 0 additions & 88 deletions ios/Classes/MapboxMapController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit b79c661

Please sign in to comment.