You are using an outdated browser and will encounter some problems with our website. Please consider upgrading.
Upgrade Now
Docs
Maps
Navigation
Search
Vision
Data
Help
Docs
Maps
Navigation
Search
Vision
Data
Help
All docs
Maps SDK for iOS
Guides
Examples
API Reference
Tutorials
Troubleshooting
All docs
Maps SDK for iOS
Examples
Examples
Swift, Objective-C
Add a marker symbol
Use a symbol layer to add a marker to the map.
Swift, Objective-C
Display a user's approximate location
Support user privacy options on iOS 14 and above by displaying an approximated user location.
Swift, Objective-C
Camera animation
Animate camera movement.
Swift, Objective-C
Apply a style designed in Mapbox Studio
Use a style created in Mapbox Studio with the Mapbox Maps SDK for iOS.
Swift, Objective-C
Simple map view
Show a map in a view controller with the Mapbox Maps SDK for iOS.
Swift, Objective-C
Add a line style layer from GeoJSON
Add a polyline from a GeoJSON source and style it dynamically.
Swift, Objective-C
Add a pattern to a polygon
Create a polygon with a custom fill pattern.
Swift, Objective-C
Add an image
Add an image to a map using an image source and raster style layer.
Swift, Objective-C
Add an inset map
Display a synchronized second map view.
Swift, Objective-C
Add live data
Add and update a source that uses real-time data.
Swift, Objective-C
Add multiple shapes from a single shape source
Create style layers from a shape collection feature.
Swift, Objective-C
Add raster imagery
Dynamically add a raster source.
Swift, Objective-C
Adjust lighting of 3D buildings
Adjust the lighting properties for fill extrusions with a slider.
Swift, Objective-C
Animate a line
Add an animated polyline from a GeoJSON source.
Swift, Objective-C
Annotation views
Custom annotation views with animated selection.
Swift, Objective-C
Cluster point data
Color & display data point clusters using interval-based property styling.
Swift, Objective-C
Create a heatmap layer
Visualize earthquake data using a heatmap layer.
Swift, Objective-C
Create a static map snapshot
Create a map snapshot object.
Swift, Objective-C
Customize the user location annotation
Override the default user location annotation.
Swift, Objective-C
Data-driven circles
Dynamically style a circle layer with data-driven styling.
Swift, Objective-C
Default callout usage
Use default appearance and interactivity of annotation callout views.
Swift, Objective-C
Default styles
Use a variety of professionally designed styles with the Mapbox Maps SDK for iOS.
Swift, Objective-C
Display custom views as callouts
Create and display a custom callout view with the Mapbox Maps SDK for iOS.
Swift, Objective-C
Display multiple images in a symbol layer
Display multiple images within the same symbol layer with the Mapbox Maps SDK for iOS.
Swift, Objective-C
Display multiple shapes on a map
Display multiple shapes from a single source of data.
Swift, Objective-C
Download an offline map
Download an offline pack and track its progress.
Swift, Objective-C
Draggable annotation views
Custom annotation views with that can be dragged.
Swift, Objective-C
Dynamically style interactive points
Add interactive, dynamically-styled points, derived from a web API call.
Swift, Objective-C
Manage offline regions
Pan around a map to select a region and download one or more regions for offline use.
Swift, Objective-C
Point conversion
Convert between screen location and geographic coordinates.
Swift, Objective-C
Restrict map panning to an area
Prevent a map from being panned to a different place by constraining the viewport.
Swift, Objective-C
Select a feature within a layer
Allow a user to select a feature within a style layer.
Swift, Objective-C
Show and hide a layer
Add a source and a toggleable layer.
Swift, Objective-C
Switch between map styles
Switch between map styles using a UISegmentedControl.
Swift, Objective-C
Switch between user tracking modes
Toggle between user tracking modes using a custom UIButton.
Swift, Objective-C
Use images to cluster point data
Color & display clustered point data using images and interval-based property styling.
Swift, Objective-C
Use third-party vector tiles
Load a third-party vector source using a custom style.