Skip to content

Commit 623b430

Browse files
committed
Deploying to gh-pages from @ 3e529c0 🚀
1 parent 97672e0 commit 623b430

File tree

1,193 files changed

+1193
-1193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,193 files changed

+1193
-1193
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"interfaceLanguage":"occ","url":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/AddMarkerSymbolExample"},"hierarchy":{"paths":[["doc:\/\/org.swift.MyProject\/documentation\/MapLibre"]]},"kind":"article","primaryContentSections":[{"content":[{"name":"Note","type":"aside","style":"note","content":[{"type":"paragraph","inlineContent":[{"text":"This example uses UIKit.","type":"text"}]}]},{"syntax":"swift","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"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"occ"}],"paths":["\/documentation\/maplibre-native-for-ios\/addmarkersymbolexample"]}],"abstract":[{"type":"text","text":"Simply add a marker to a map!"}],"metadata":{"roleHeading":"Article","modules":[{"name":"MapLibre"}],"role":"article","title":"Add Marker"},"seeAlsoSections":[{"identifiers":["doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted"],"generated":true,"title":"Essentials"}],"sections":[],"references":{"doc://org.swift.MyProject/documentation/MapLibre-Native-for-iOS/GettingStarted":{"kind":"article","type":"topic","identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted","role":"article","abstract":[{"type":"text","text":"Setting up an Xcode project that uses MapLibre Native for iOS."}],"title":"Getting Started","url":"\/documentation\/maplibre-native-for-ios\/gettingstarted"},"doc://org.swift.MyProject/documentation/MapLibre":{"title":"MapLibre","role":"collection","type":"topic","url":"\/documentation\/maplibre","abstract":[{"type":"text","text":"Powerful, free and open-source mapping toolkit with full control over data sources and styling."}],"kind":"symbol","identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre"}}}
1+
{"kind":"article","identifier":{"interfaceLanguage":"occ","url":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/AddMarkerSymbolExample"},"seeAlsoSections":[{"identifiers":["doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted"],"title":"Essentials","generated":true}],"abstract":[{"type":"text","text":"Simply add a marker to a map!"}],"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/org.swift.MyProject\/documentation\/MapLibre"]]},"primaryContentSections":[{"content":[{"content":[{"inlineContent":[{"text":"This example uses UIKit.","type":"text"}],"type":"paragraph"}],"style":"note","name":"Note","type":"aside"},{"syntax":"swift","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"}],"kind":"content"}],"variants":[{"paths":["\/documentation\/maplibre-native-for-ios\/addmarkersymbolexample"],"traits":[{"interfaceLanguage":"occ"}]}],"metadata":{"title":"Add Marker","modules":[{"name":"MapLibre"}],"role":"article","roleHeading":"Article"},"references":{"doc://org.swift.MyProject/documentation/MapLibre":{"url":"\/documentation\/maplibre","title":"MapLibre","abstract":[{"text":"Powerful, free and open-source mapping toolkit with full control over data sources and styling.","type":"text"}],"kind":"symbol","type":"topic","role":"collection","identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre"},"doc://org.swift.MyProject/documentation/MapLibre-Native-for-iOS/GettingStarted":{"type":"topic","role":"article","title":"Getting Started","kind":"article","url":"\/documentation\/maplibre-native-for-ios\/gettingstarted","abstract":[{"type":"text","text":"Setting up an Xcode project that uses MapLibre Native for iOS."}],"identifier":"doc:\/\/org.swift.MyProject\/documentation\/MapLibre-Native-for-iOS\/GettingStarted"}}}

0 commit comments

Comments
 (0)