summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2019-09-09 17:57:53 -0700
committerjmkiley <jordan.kiley@mapbox.com>2019-09-09 17:57:53 -0700
commit38db525f6f28603155ab9741db35f4a528496251 (patch)
treedaa53b573b3b9f005bf6b1ea001e2df7fa4cc158
parentb391679799cff8145cf44a06500cfe0ebe9d8168 (diff)
downloadqtlocation-mapboxgl-38db525f6f28603155ab9741db35f4a528496251.tar.gz
[ios] Minor changes to playground
-rw-r--r--platform/ios/Mapbox.playground/Contents.swift8
-rw-r--r--platform/ios/Mapbox.playground/contents.xcplayground2
2 files changed, 4 insertions, 6 deletions
diff --git a/platform/ios/Mapbox.playground/Contents.swift b/platform/ios/Mapbox.playground/Contents.swift
index f31c9b6171..c44721bce4 100644
--- a/platform/ios/Mapbox.playground/Contents.swift
+++ b/platform/ios/Mapbox.playground/Contents.swift
@@ -121,10 +121,10 @@ class MapDelegate: NSObject, MGLMapViewDelegate {
let isRecognized = press.state == .recognized
if (isRecognized) {
- let coordinate: CLLocationCoordinate2D = mapView.convert(press.location(in: mapView), toCoordinateFrom: mapView)
+// let coordinate: CLLocationCoordinate2D = mapView.convert(press.location(in: mapView), toCoordinateFrom: mapView)
let annotation = MGLPointAnnotation()
annotation.title = "Dropped Marker"
- annotation.coordinate = coordinate
+ annotation.coordinate = mapView.convert(press.location(in: mapView), toCoordinateFrom: mapView)
mapView.addAnnotation(annotation)
mapView.showAnnotations([annotation], animated: true)
}
@@ -134,8 +134,6 @@ class MapDelegate: NSObject, MGLMapViewDelegate {
//: Create a map and its delegate
-let centerCoordinate = CLLocationCoordinate2D(latitude: 37.174057, longitude: -104.490984)
-
let mapView = MGLMapView(frame: CGRect(x: 0, y: 0, width: width, height: height))
mapView.frame = CGRect(x: 0, y: 0, width: width, height: height)
@@ -150,7 +148,7 @@ mapView.addGestureRecognizer(tapGesture)
//: Zoom in to a location
-mapView.setCenter(centerCoordinate, zoomLevel: 12, animated: false)
+mapView.setCenter(CLLocationCoordinate2D(latitude: 37.174057, longitude: -104.490984), zoomLevel: 12, animated: false)
//: Add control panel
diff --git a/platform/ios/Mapbox.playground/contents.xcplayground b/platform/ios/Mapbox.playground/contents.xcplayground
index 35968656f5..c8659f26e4 100644
--- a/platform/ios/Mapbox.playground/contents.xcplayground
+++ b/platform/ios/Mapbox.playground/contents.xcplayground
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<playground version='5.0' target-platform='ios' display-mode='raw'>
+<playground version='5.0' target-platform='ios' display-mode='raw' last-migration='1100'>
<timeline fileName='timeline.xctimeline'/>
</playground> \ No newline at end of file