Views
Using Mappedin JS 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 JS 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 TGetMapDataSharedOptions object that is passed into the getMapData() method as shown below.
const options = {
	key: KEY,
	secret: SECRET,
	mapId: MAP_ID,
	viewId: viewId,
};
const mapData = await getMapData(options);
View Example
The following example demonstrates how an app could display and switch between multiple views. Use the drop down menu to switch between the available views.