Example application on GitHub
You can find additional examples for the Maps SDK on GitHub. Clone the repository and run the example application following the instructions in the README.
Add a marker to the map
Use MapView's AnnotationManager class to add marker pins to the map using the Maps SDK for iOS.
Add a line with a color gradient
Load a polyline to a style using GeoJsonSource, display it on a map using LineLayer, and style it with a rainbow color gradient.
Add a view annotation to a point annotation
Add a ViewAnnotation to a MapView and anchor it to a point annotation.
Add animated weather data
Load a raster image to a style using ImageSource and display it on a map as animated weather data using RasterLayer.
Add view annotations connected to features
Add a ViewAnnotation to a MapView and anchor it to a feature in a symbol layer.
Display 3D buildings
Extrude the building layer in the Mapbox Light style using FillExtrusionLayer and set up the light position.
Display multiple icon images in a symbol layer
Add point data and several images to a style and use the switchCase and get expressions to choose which image to display at each point in a SymbolLayer based on a data property.
Display the user's location
Display the user's location on a map with the default user location puck.
Fly-to camera animation
Animate the map camera to a new position using camera animators. Individual camera properties such as zoom, bearing, and center coordinate can be animated independently.
Restrict the map's coordinate bounds
Prevent the map from panning outside the specified coordinate bounds.
Show and hide layers
Allow the user to toggle the visibility of a CircleLayer and LineLayer on a map.