Points of Interest
Mappedin SDK version 6 is currently in a beta state while Mappedin perfects new features and APIs. Open the v6 release notes to view the latest changes.
Using Mappedin Web SDK with your own map requires a Pro license. Try a demo map for free or refer to the Pricing page for more information.
Points of Interest can be added to a Map to represent anything that could be useful for users to be aware of. They are contained in the PointOfInterest class, which contains a coordinate, name, description, images, links and the floor the point of interest exists on. All of these elements are configured in the Mappedin Editor.
Video Walkthrough
PointOfInterest.name could be used to create labels to show users helpful information. The code sample below creates a label at the location of each PointOfInterest and uses its name as the label text. It also verifies that the PointOfInterest exists on the current floor being shown in the MapView.
// Iterate through each point of interest and label it.
for (const poi of mapData.getByType('point-of-interest')) {
// Label the point of interest if it's on the map floor currently shown.
if (poi.floor.id === mapView.currentFloor.id) {
mapView.Labels.add(poi.coordinate, poi.name);
}
}
The following CodeSandbox demonstrates one possible use for PointOfInterest. It labels each PointOfInterest and uses Camera.animateTo() to create a flyby of each one. Reload the CodeSandbox to restart the animation.