Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 675 Bytes

location-services.md

File metadata and controls

18 lines (14 loc) · 675 Bytes

Location Services

It is extremely easy to show the user's current location on the map. Simply call MZMapViewController#showCurrentLocation(true) to display an icon on the map. The iOS SDK also supports visually tracking and centering on the user's current location. To display a button to enable this behavior, call MZMapViewController#showFindMeButon(true).

import Mapzen-ios-sdk

class LocationExampleViewController:  MZMapViewController {

  override func viewDidLoad() {
    super.viewDidLoad()

    try? loadStyleAsync(.bubbleWrap) { [unowned self] (style) in
      _ = self.showCurrentLocation(true)
      _ = self.showFindMeButon(true)
    }
  }
}