Dynamic styling (28)
Add a new layer below labels
Using the second argument of addLayerBelow, you can be more precise where your layer ends up in the map stack.
Add an image source with time lapse
Use an image source and a runnable to show data changes over time.
Change color based on zoom level
Make a property depend on the map zoom level, in this case, the water layers fill color.
Indoor mapping floor plan
Display an indoor map of a building with toggles to switch between floor levels.
Marker following route
Using a map matched GeoJSON route, the marker travels along the route at consistent speed.
Use the Android system's picture-in-picture functionality to maintain a map in a separate window (requires Android O and above).
Pulsing layer opacity
Use the style API to adjust layers' opacity to highlight data. Los Angeles' parks, hotels, and attractions are displayed in this example.
Style lines using an identity property function
Using an identity line-color property function for a visualization.
SymbolLayer icons and Mapillary integration
Add markers via SymbolLayer and manipulate the data in real time. A Mapillary integration is also showcased in this example.
Create a transparent background and fill it with something such as a video of moving water.
Data visualization (13)
Add multiple heatmap styles
Gain minute control over heat map coloring, size, density, and other styling.
Data time lapse
Use data-driven styling to visualize point data with a time lapse effect; rainfall in China in this example.
Join local JSON data with vector tile geometries
Style a choropleth map by merging local JSON data with vector tile geometries.
Adjust light location and color
Change the location and color of the light that's shined on extrusions.
Display 3D building height based on vector data
Use imported vector data to set the height of 3D building extrusions.
Extrude polygons for 3D indoor mapping
Create a 3D indoor map with the full-extrude-height paint property.
Querying the map (4)
Marker symbol layer
Display markers on the map by adding a SymbolLayer. Query the map and animate the icon size if the symbol is clicked on.
Query a map feature
Click the map to add a marker at the location and display the maps property information for this feature.
Add features to a map (6)
Create a line layer
Create a GeoJSON line source, style it using properties, and add the layer to the map.
User interaction (10)
Count features in a selected area
Get the feature count inside a bounding box and highlight all the buidings.
Directions to selected location
Show a dotted directions route to a location that\'s based on map movement.
Show a smaller inset map fragment and link it to a larger map for two map interaction. Ideal for gaming.
Device location (3)
Add user's location to a map fragment
Use the LocationComponent to show a user's location in a map fragment.
Set a map style (4)
Use a local style source
Example loads the map style via a locally stored style JSON file or custom raster style.