Views
Using Mappedin SDK for Android with your own map requires a Pro license. Try a demo map for free or refer to the Pricing page for more information.
A view is a copy of a map that allows a map creator to toggle the visibility of a layer or individual items in a layer on and off and choose a map theme. It is similarly named but should not be confused with the MapView class, which is used to show a map.
Views allow the same map to be used for many use cases, such as:
- Public use for wayfinding
- Use one of many light or dark themes
- With safety annotations for safety and security personnel
- Showing private areas for maintenance and custodial staff
- Displaying only the floor plan for leasing prospects
- Highlighting delivery doors for delivery drivers
- and many more...
Get a View ID
A viewId is used by Mappedin SDKs to download specific view. To get a viewId:
- Log into Mappedin Maker.
- Click on the
Developerstab. - Select the desired map from the map drop down.
- Select the desired view from the view drop down.
- The
viewIdwill be shown in the code snippet on the page.
Display a View
To display a specific view of a map, specify the viewId of the view using the GetMapDataWithCredentialsOptions or GetMapDataWithAccessTokenOptions objects that is passed into the MapView.getMapData() method as shown below.
// See Trial API key Terms and Conditions
// https://developer.mappedin.com/docs/demo-keys-and-maps
val options =
GetMapDataWithCredentialsOptions(
key = "mik_yeBk0Vf0nNJtpesfu560e07e5",
secret = "mis_2g9ST8ZcSFb5R9fPnsvYhrX3RyRwPtDGbMGweCYKEq385431022",
mapId = "660c0c3aae0596d87766f2da",
viewId = "71-i",
)
// Load the map data.
mapView.getMapData(options) { result ->