You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// // AgentLocation.swift // GMERemittance // // Created by Sujal on 12/28/17. // Copyright © 2017 Gobal Money Express Co. Ltd. All rights reserved. //
import Foundation import UIKit import MapKit
class AgentLocation: UIViewController { @IBOutlet weak var map: MKMapView! var latitude: CLLocationDegrees? var longitude: CLLocationDegrees? override func viewDidLoad() { super.viewDidLoad() setUpNavBar(id: 201, title: "Agent") let latDelta: CLLocationDegrees = 0.01 let lonDelta: CLLocationDegrees = 0.01 let span: MKCoordinateSpan = MKCoordinateSpanMake(latDelta, lonDelta) let location: CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitude!, longitude!) let region: MKCoordinateRegion = MKCoordinateRegionMake(location, span) map.setRegion(region, animated: true) // map.addAnnotation(CLLocationCoordinate2D(latitude: latitude!, longitude: longitude!) as! MKAnnotation) let annotation = MKPointAnnotation() annotation.coordinate = location annotation.title = "GME Agent" annotation.subtitle = "" map.addAnnotation(annotation) } }
|