-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 3acfd02 🚀
- Loading branch information
Showing
1,172 changed files
with
1,172 additions
and
1,172 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
ios/latest/data/documentation/maplibre-native-for-ios/addmarkersymbolexample.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"identifier":{"interfaceLanguage":"occ","url":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/AddMarkerSymbolExample"},"metadata":{"modules":[{"name":"MapLibre"}],"roleHeading":"Article","role":"article","title":"Add Marker"},"seeAlsoSections":[{"title":"Essentials","generated":true,"identifiers":["doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted"]}],"primaryContentSections":[{"kind":"content","content":[{"name":"Note","style":"note","content":[{"inlineContent":[{"type":"text","text":"This example uses UIKit."}],"type":"paragraph"}],"type":"aside"},{"code":["class AddMarkerSymbolExampleUIKit: UIViewController, MLNMapViewDelegate {"," override func viewDidLoad() {"," super.viewDidLoad()",""," let mapView = MLNMapView(frame: view.bounds)"," mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]"," mapView.delegate = self",""," \/\/ Set the map’s center coordinate and zoom level."," mapView.setCenter(CLLocationCoordinate2D(latitude: 41.8864, longitude: -87.7135), zoomLevel: 13, animated: false)"," view.addSubview(mapView)"," }",""," func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle) {"," \/\/ Create point to represent where the symbol should be placed"," let point = MLNPointAnnotation()"," point.coordinate = mapView.centerCoordinate",""," \/\/ Create a data source to hold the point data"," let shapeSource = MLNShapeSource(identifier: \"marker-source\", shape: point, options: nil)",""," \/\/ Create a style layer for the symbol"," let shapeLayer = MLNSymbolStyleLayer(identifier: \"marker-style\", source: shapeSource)",""," \/\/ Add the image to the style's sprite"," if let image = UIImage(named: \"house-icon\") {"," style.setImage(image, forName: \"home-symbol\")"," }",""," \/\/ Tell the layer to use the image in the sprite"," shapeLayer.iconImageName = NSExpression(forConstantValue: \"home-symbol\")",""," \/\/ Add the source and style layer to the map"," style.addSource(shapeSource)"," style.addLayer(shapeLayer)"," }","}"],"type":"codeListing","syntax":"swift"}]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"article","abstract":[{"type":"text","text":"Simply add a marker to a map!"}],"sections":[],"variants":[{"paths":["\/documentation\/maplibre-native-for-ios\/addmarkersymbolexample"],"traits":[{"interfaceLanguage":"occ"}]}],"hierarchy":{"paths":[["doc:\/\/org.swift.MyProject\/documentation\/MapLibre"]]},"references":{"doc://org.swift.MyProject/documentation/MapLibre-Native-for-iOS/GettingStarted":{"role":"article","url":"\/documentation\/maplibre-native-for-ios\/gettingstarted","identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted","kind":"article","title":"Getting Started","type":"topic","abstract":[{"type":"text","text":"Setting up an Xcode project that uses MapLibre Native for iOS."}]},"doc://org.swift.MyProject/documentation/MapLibre":{"type":"topic","role":"collection","abstract":[{"text":"Powerful, free and open-source mapping toolkit with full control over data sources and styling.","type":"text"}],"identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre","url":"\/documentation\/maplibre","kind":"symbol","title":"MapLibre"}}} | ||
{"seeAlsoSections":[{"title":"Essentials","identifiers":["doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted"],"generated":true}],"abstract":[{"text":"Simply add a marker to a map!","type":"text"}],"kind":"article","sections":[],"identifier":{"interfaceLanguage":"occ","url":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/AddMarkerSymbolExample"},"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/org.swift.MyProject\/documentation\/MapLibre"]]},"primaryContentSections":[{"kind":"content","content":[{"type":"aside","name":"Note","style":"note","content":[{"inlineContent":[{"text":"This example uses UIKit.","type":"text"}],"type":"paragraph"}]},{"code":["class AddMarkerSymbolExampleUIKit: UIViewController, MLNMapViewDelegate {"," override func viewDidLoad() {"," super.viewDidLoad()",""," let mapView = MLNMapView(frame: view.bounds)"," mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]"," mapView.delegate = self",""," \/\/ Set the map’s center coordinate and zoom level."," mapView.setCenter(CLLocationCoordinate2D(latitude: 41.8864, longitude: -87.7135), zoomLevel: 13, animated: false)"," view.addSubview(mapView)"," }",""," func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle) {"," \/\/ Create point to represent where the symbol should be placed"," let point = MLNPointAnnotation()"," point.coordinate = mapView.centerCoordinate",""," \/\/ Create a data source to hold the point data"," let shapeSource = MLNShapeSource(identifier: \"marker-source\", shape: point, options: nil)",""," \/\/ Create a style layer for the symbol"," let shapeLayer = MLNSymbolStyleLayer(identifier: \"marker-style\", source: shapeSource)",""," \/\/ Add the image to the style's sprite"," if let image = UIImage(named: \"house-icon\") {"," style.setImage(image, forName: \"home-symbol\")"," }",""," \/\/ Tell the layer to use the image in the sprite"," shapeLayer.iconImageName = NSExpression(forConstantValue: \"home-symbol\")",""," \/\/ Add the source and style layer to the map"," style.addSource(shapeSource)"," style.addLayer(shapeLayer)"," }","}"],"syntax":"swift","type":"codeListing"}]}],"metadata":{"roleHeading":"Article","modules":[{"name":"MapLibre"}],"title":"Add Marker","role":"article"},"variants":[{"paths":["\/documentation\/maplibre-native-for-ios\/addmarkersymbolexample"],"traits":[{"interfaceLanguage":"occ"}]}],"references":{"doc://org.swift.MyProject/documentation/MapLibre":{"role":"collection","url":"\/documentation\/maplibre","abstract":[{"type":"text","text":"Powerful, free and open-source mapping toolkit with full control over data sources and styling."}],"identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre","kind":"symbol","type":"topic","title":"MapLibre"},"doc://org.swift.MyProject/documentation/MapLibre-Native-for-iOS/GettingStarted":{"url":"\/documentation\/maplibre-native-for-ios\/gettingstarted","role":"article","identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted","kind":"article","abstract":[{"type":"text","text":"Setting up an Xcode project that uses MapLibre Native for iOS."}],"type":"topic","title":"Getting Started"}}} |
Oops, something went wrong.