Skip to content

Commit

Permalink
iOS: cast to NSObject
Browse files Browse the repository at this point in the history
  • Loading branch information
m0nac0 committed Aug 14, 2020
1 parent 11b9344 commit 8dac4af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ios/Classes/MapboxMapController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma
let latlng = CLLocationCoordinate2DMake(latitude, longitude)
let returnVal = mapView.convert(latlng, toPointTo: mapView)
var reply = [String: NSObject]()
reply["x"] = returnVal.x
reply["y"] = returnVal.y
reply["x"] = returnVal.x as NSObject
reply["y"] = returnVal.y as NSObjects
result(reply)
case "map#toLatLng":
guard let arguments = methodCall.arguments as? [String: Any] else { return }
Expand All @@ -182,8 +182,8 @@ class MapboxMapController: NSObject, FlutterPlatformView, MGLMapViewDelegate, Ma
let screenPoint: CGPoint = CGPoint(x: y, y:y)
let coordinates: CLLocationCoordinate2D = mapView.convert(screenPoint, toCoordinateFrom: mapView)
var reply = [String: NSObject]()
reply["latitude"] = coordinates.latitude
reply["longitude"] = coordinates.longitude
reply["latitude"] = coordinates.latitude as NSObject
reply["longitude"] = coordinates.longitude as NSObject
result(reply)
case "camera#move":
guard let arguments = methodCall.arguments as? [String: Any] else { return }
Expand Down

0 comments on commit 8dac4af

Please sign in to comment.