Getting started (5)
Add user's location to a map fragment
Use the LocationComponent to show a user's location in a map fragment.
Dynamic styling (18)
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.
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 in order 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 (7)
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
Display data with a time lapse effect
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
Use GeoJSON data to set extrusion height
Use data-driven styling and GeoJSON data to set extrusions' heights
Add markers and infoWindows to the map (5)
Use GeoJSON data and circle layers to visualize point data as circle clusters.
User interaction (10)
Count features in a selected area
Get the feature count inside a bounding box and highlight all the buidings.
Show a smaller inset map fragment and link it to a larger map for two map interaction. Great for gaming!
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 (5)
Create a line layer
Create a GeoJSON line source, style it using properties, and add the layer to the map.
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.