Skip to content

Instantly share code, notes, and snippets.

@here-devblog-gists
Created July 30, 2018 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save here-devblog-gists/e3d11072cd7d7a8d1619400904f91271 to your computer and use it in GitHub Desktop.
Save here-devblog-gists/e3d11072cd7d7a8d1619400904f91271 to your computer and use it in GitHub Desktop.
import UIKit
import NMAKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
/* HERE Maps */
let mapView = NMAMapView()
let coordinates = NMAGeoCoordinates(latitude: 47.611571, longitude: -122.333003)
mapView.useHighResolutionMap = true
mapView.zoomLevel = 13.2
mapView.set(geoCenter: coordinates, animation: .linear)
view = mapView
let mapCircle = NMAMapCircle(coordinates: coordinates, radius: 150)
mapView.add(mapCircle)
/* Google Maps */
//let camera = GMSCameraPosition.camera(withLatitude: 47.611571, longitude: -122.333003, zoom: 6.0)
//let mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
//view = mapView
//let marker = GMSMarker()
//marker.position = CLLocationCoordinate2D(latitude: -33.86, longitude: 151.20)
//marker.title = "Sydney"
//marker.snippet = "Australia"
//marker.map = mapView
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment