Location Profiles & Categories
Mappedin SDK for React Native version 6 is currently in an alpha state while Mappedin perfects new features and APIs. Open the v6 release notes to view the latest changes.
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 Location refers to something that represents a physical position on the map, such as an annotation, area, connection (e.g. stairs or elevator), door, point of interest or space. Locations may have a Mappedin.LocationProfile attached to them. The profiles contain information about the location such as its name, description, social media links, opening hours, logo and more. A LocationProfile can have zero to many Mappedin.LocationCategory attached to it. A LocationCategory may have a child or parent category. For example, the parent Food & Drink
LocationCategory has children such as Bar
, Cafe
, Food Court
and Mediterranean Cuisine
.
LocationProfile
A LocationProfile can be accessed by using the locationProfiles
property of a location. For example, use Mappedin.Space.locationProfiles to access every LocationProfile of a space. Every LocationProfile can also be access using the Mappedin.MapData.getByType() method as shown below.
const locationProfiles = mapData.getByType('location-profile');
LocationCategory
To access the Mappedin.LocationCategory of a LocationProfile, use the Mappedin.LocationProfile.categories property. Note that a LocationCategory can have either parent or child categories. These are accessible using the Mappedin.LocationCategory.parent and Mappedin.LocationCategory.children properties respectively. Every LocationCategory can also be access using the MapData.getByType() method as shown below.
const locationCategories = mapData.getByType('location-category');