Display a Map
Display a Map with MapsIndoors
import GoogleMaps
import MapsIndoorsclass ViewController: UIViewController {
private var mapControl:MPMapControl?
var mapView = GMSMapView.map(withFrame: CGRect.init(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height), camera: GMSCameraPosition())
...
}self.view.addSubview(mapView)self.mapControl = MPMapControl(map: mapView)
let query = MPQuery()
let filter = MPFilter()
query.query = "White House"
filter.take = 1
MPLocationService.sharedInstance().getLocationsUsing(query, filter: filter) { (locations, error) in
if let location = locations?.first {
self.mapControl?.go(to:location)
}
}Expected Result

Last updated
Was this helpful?