# Mappedin JS SDK > JavaScript SDK for building indoor mapping applications with Mappedin - Interactive 3D indoor maps with pan, zoom, and rotation - Wayfinding and navigation between locations - Search and filtering of locations and categories - Support for both Maker and CMS/Enterprise data sources ## Understanding Data Sources This SDK supports two data sources. **You MUST identify which one applies before writing code.** ### Maker Data Source - **Credentials**: API key starts with `mik_` - **Location types**: Use `location-profile` and `location-category` - **Access pattern**: `mapData.getByType('location-profile')` ### CMS/Enterprise Data Source - **Credentials**: clientId/clientSecret, or API key that does NOT start with `mik_` - **Location types**: Use `enterprise-location` and `enterprise-category` - **Access pattern**: `mapData.getByType('enterprise-location')` ### Zip File / Bundle (hydrateMapData) **AI INSTRUCTION: When the user is loading from a zip file, ASK them before generating code:** > "I see you're loading from a zip file. Do you know if this map data is from: > 1. **Maker** (use `location-profile`) > 2. **CMS/Enterprise** (use `enterprise-location`) > 3. **Unknown / Want universal code** (use `isEnterpriseMode` to handle both) > > If you're unsure, option 3 will work with any zip file." **Based on user's answer:** - **Maker** → Generate single-path code using `location-profile`, `location-category` - **Enterprise** → Generate single-path code using `enterprise-location`, `enterprise-category`, `enterprise-venue` - **Unknown/Universal** → Generate dual-path code using `mapData.isEnterpriseMode` to detect at runtime **Important**: Using the wrong data types will result in empty arrays. ## Common Mistakes **DO NOT import CSS** - Styles are automatically injected by `show3dMap()` by default: ```typescript // WRONG - not needed, styles are auto-injected: import '@mappedin/mappedin-js/lib/index.css'; // CORRECT - just call show3dMap, no CSS import needed: const mapView = await show3dMap(container, mapData); ``` Only import CSS manually if you explicitly set `injectStyles: false` in the options. **DO NOT use `mapData.spaces`** - There is no `spaces` property. Use `getByType()` instead: ```typescript // WRONG - property doesn't exist: const spaces = mapData.spaces; // CORRECT - use getByType: const spaces = mapData.getByType('space'); const floors = mapData.getByType('floor'); ``` ## Enterprise/CMS API - [EnterpriseCategory](https://docs.mappedin.com/web/v6/latest/classes/EnterpriseCategory.html) (class): An EnterpriseCategory groups one or more EnterpriseLocation. - [EnterpriseLocation](https://docs.mappedin.com/web/v6/latest/classes/EnterpriseLocation.html) (class): An EnterpriseLocation contains metadata about a location, such as its name, description, logo, phone number, social media links, hours of operation and more. - [EnterpriseVenue](https://docs.mappedin.com/web/v6/latest/classes/EnterpriseVenue.html) (class): The EnterpriseVenue class holds metadata about the map, which includes the map name, supported languages, default language, top locations and more. ## Maker API - [LocationCategory](https://docs.mappedin.com/web/v6/latest/classes/LocationCategory.html) (class): A LocationCategory groups one or more LocationProfile. - [LocationProfile](https://docs.mappedin.com/web/v6/latest/classes/LocationProfile.html) (class): A LocationProfile contains metadata about a location, such as its name, description, logo, phone number, social media links, hours of operation and more. ## Core - [enableTestMode](https://docs.mappedin.com/web/v6/latest/functions/enableTestMode.html) (function) - [getMapData](https://docs.mappedin.com/web/v6/latest/functions/getMapData.html) (function) - [getVersion](https://docs.mappedin.com/web/v6/latest/functions/getVersion.html) (function) - [hydrateMapData](https://docs.mappedin.com/web/v6/latest/functions/hydrateMapData.html) (function) - [MapData](https://docs.mappedin.com/web/v6/latest/interfaces/MapData.html) (interface): MapData in Mappedin JS MapData is the core data container for all map information, providing access to spaces, floors, points of interest, and navigation capabilities. - [MapView](https://docs.mappedin.com/web/v6/latest/classes/MapView.html) (class): MapView in Mappedin JS MapView is the main rendering and interaction class for Mappedin maps. - [PubSub](https://docs.mappedin.com/web/v6/latest/interfaces/PubSub.html) (interface): Generic PubSub class implementing the Publish-Subscribe pattern for event handling. - [setLoggerLevel](https://docs.mappedin.com/web/v6/latest/functions/setLoggerLevel.html) (function) - [show3dMap](https://docs.mappedin.com/web/v6/latest/functions/show3dMap.html) (function) ## Camera - [BEARING_TYPE](https://docs.mappedin.com/web/v6/latest/enums/BEARING_TYPE.html) (enum) - [Camera](https://docs.mappedin.com/web/v6/latest/interfaces/Camera.html) (interface): Camera in Mappedin JS The Camera class controls the map's viewpoint, including position, pitch, bearing, and zoom. - [CameraBounds](https://docs.mappedin.com/web/v6/latest/types/CameraBounds.html) (type): The pan bounds of the camera. - [CameraTransform](https://docs.mappedin.com/web/v6/latest/interfaces/CameraTransform.html) (interface): Class representing camera transformation data. - [InsetPadding](https://docs.mappedin.com/web/v6/latest/types/InsetPadding.html) (type) - [InsetPaddingOption](https://docs.mappedin.com/web/v6/latest/interfaces/InsetPaddingOption.html) (interface): An option for setting the inset padding of the camera. - [TBearingType](https://docs.mappedin.com/web/v6/latest/types/TBearingType.html) (type) - [TCameraAnimationOptions](https://docs.mappedin.com/web/v6/latest/types/TCameraAnimationOptions.html) (type): Options for Camera animations on the map. - [TCameraInteractionsSetOptions](https://docs.mappedin.com/web/v6/latest/types/TCameraInteractionsSetOptions.html) (type): Options to control which camera interactions are enabled in the MapView. - [TCameraTarget](https://docs.mappedin.com/web/v6/latest/types/TCameraTarget.html) (type): Defines the target for camera operations. - [TFocusOnOptions](https://docs.mappedin.com/web/v6/latest/types/TFocusOnOptions.html) (type): Options for focusing the Camera on a target. - [TFocusTarget](https://docs.mappedin.com/web/v6/latest/types/TFocusTarget.html) (type): A map element that can be focused on by the camera. ## Labels - [Label](https://docs.mappedin.com/web/v6/latest/interfaces/Label.html) (interface): Class representing a label on the MapView. - [LabelAppearance](https://docs.mappedin.com/web/v6/latest/types/LabelAppearance.html) (type): Options to control how a label is rendered. - [Labels](https://docs.mappedin.com/web/v6/latest/interfaces/Labels.html) (interface): Labels in Mappedin JS Labels are text elements anchored to map objects that automatically rotate, show/hide based on priority and zoom level, and manage collisions with other labels. - [LabelTextPlacement](https://docs.mappedin.com/web/v6/latest/types/LabelTextPlacement.html) (type) - [TAddLabelOptions](https://docs.mappedin.com/web/v6/latest/types/TAddLabelOptions.html) (type): Options for creating a new Label with Labels. - [TCollisionRankingTier](https://docs.mappedin.com/web/v6/latest/types/TCollisionRankingTier.html) (type): Defines the priority levels for collider collision handling, allowing customization of collider visibility in congested areas. - [TLabelState](https://docs.mappedin.com/web/v6/latest/types/TLabelState.html) (type) - [TLabelUpdateState](https://docs.mappedin.com/web/v6/latest/types/TLabelUpdateState.html) (type) ## Markers - [Marker](https://docs.mappedin.com/web/v6/latest/interfaces/Marker.html) (interface): Mappedin JS allows adding and removing Markers on a map using the Markers class. - [Markers](https://docs.mappedin.com/web/v6/latest/interfaces/Markers.html) (interface): Markers in Mappedin JS Markers are interactive HTML elements anchored to a Door, Space, Coordinate, or Node on the map. - [TAddMarkerOptions](https://docs.mappedin.com/web/v6/latest/types/TAddMarkerOptions.html) (type): Options for controlling the behavior of a Marker. - [TCreateMarker](https://docs.mappedin.com/web/v6/latest/types/TCreateMarker.html) (type): Controls marker creation for navigation points. - [TMarkerPlacement](https://docs.mappedin.com/web/v6/latest/types/TMarkerPlacement.html) (type): Defines the placement position for a Marker, offering a selection of intuitive string options to pinpoint how the marker should be aligned. - [TMarkerState](https://docs.mappedin.com/web/v6/latest/types/TMarkerState.html) (type) - [TMarkerUpdateState](https://docs.mappedin.com/web/v6/latest/types/TMarkerUpdateState.html) (type) ## Paths & Navigation - [CONNECTION_TYPE](https://docs.mappedin.com/web/v6/latest/enums/CONNECTION_TYPE.html) (enum) - [Directions](https://docs.mappedin.com/web/v6/latest/classes/Directions.html) (class): Represents a set of directions between two points. - [Navigation](https://docs.mappedin.com/web/v6/latest/interfaces/Navigation.html) (interface): When a user needs to get from point A to point B, drawing a path on the map helps them to navigate to their destination. - [NavigationState](https://docs.mappedin.com/web/v6/latest/types/NavigationState.html) (type) - [Path](https://docs.mappedin.com/web/v6/latest/interfaces/Path.html) (interface): Class representing a path on the MapView. - [Paths](https://docs.mappedin.com/web/v6/latest/interfaces/Paths.html) (interface): Paths in Mappedin JS Paths allow you to draw custom routes on the map, from simple straight lines between coordinates to complex navigation paths that avoid obstacles. - [PathSegment](https://docs.mappedin.com/web/v6/latest/interfaces/PathSegment.html) (interface): A segment of a complete path. - [TAddPathOptions](https://docs.mappedin.com/web/v6/latest/types/TAddPathOptions.html) (type): Options for controlling the behavior of a Path. - [TConnectionPathOptions](https://docs.mappedin.com/web/v6/latest/types/TConnectionPathOptions.html) (type): Options specific to connection paths (vertical paths between floors). - [TConnectionType](https://docs.mappedin.com/web/v6/latest/types/TConnectionType.html) (type) - [TDirectionInstruction](https://docs.mappedin.com/web/v6/latest/types/TDirectionInstruction.html) (type): Represents a single instruction in a set of directions between two points. - [TDirectionInstructionAction](https://docs.mappedin.com/web/v6/latest/types/TDirectionInstructionAction.html) (type): Represents an action within a direction instruction. - [TDirectionZone](https://docs.mappedin.com/web/v6/latest/types/TDirectionZone.html) (type): Defines the special zone for navigation operations. - [TGetDirectionsOptions](https://docs.mappedin.com/web/v6/latest/types/TGetDirectionsOptions.html) (type): Options for controlling the behavior of the Directions. - [TNavigationOptions](https://docs.mappedin.com/web/v6/latest/types/TNavigationOptions.html) (type): Options for navigation. - [TNavigationPathOptions](https://docs.mappedin.com/web/v6/latest/types/TNavigationPathOptions.html) (type): Path options extended with connection-specific overrides for Navigation. - [TNavigationTarget](https://docs.mappedin.com/web/v6/latest/types/TNavigationTarget.html) (type): Defines the target for navigation operations. - [TPathSectionHighlightOptions](https://docs.mappedin.com/web/v6/latest/types/TPathSectionHighlightOptions.html) (type): Configuration options for highlighting a specific section of a path on the map. - [TPathState](https://docs.mappedin.com/web/v6/latest/types/TPathState.html) (type) - [TPathUpdateState](https://docs.mappedin.com/web/v6/latest/types/TPathUpdateState.html) (type) ## Models & 3D Objects - [AddText3DOptions](https://docs.mappedin.com/web/v6/latest/types/AddText3DOptions.html) (type): Options for labeling a geometry with 3D text. - [disableText3DWorker](https://docs.mappedin.com/web/v6/latest/functions/disableText3DWorker.html) (function) - [Image3D](https://docs.mappedin.com/web/v6/latest/interfaces/Image3D.html) (interface): 3D images in Mappedin JS Images can enhance indoor maps by adding custom branding, highlighting important features, or providing additional visual information. - [Image3DView](https://docs.mappedin.com/web/v6/latest/interfaces/Image3DView.html) (interface): Class representing an Image on the MapView. - [InitializeModelState](https://docs.mappedin.com/web/v6/latest/interfaces/InitializeModelState.html) (interface): initialize model state Note: EXPERIMENTAL_clippingEnabled and visibleThroughGeometry are now part of ModelStyle - [InitializeText3DState](https://docs.mappedin.com/web/v6/latest/interfaces/InitializeText3DState.html) (interface) - [Model](https://docs.mappedin.com/web/v6/latest/interfaces/Model.html) (interface): Class representing a 3D model on the MapView. - [Models](https://docs.mappedin.com/web/v6/latest/interfaces/Models.html) (interface): 3D Models in Mappedin JS 3D models can be used to represent landmarks, assets, or furniture, providing a rich and interactive indoor map experience. - [preloadFont](https://docs.mappedin.com/web/v6/latest/functions/preloadFont.html) (function) - [Shape](https://docs.mappedin.com/web/v6/latest/interfaces/Shape.html) (interface): Class representing GeoJSON shape on the MapView. - [Shapes](https://docs.mappedin.com/web/v6/latest/interfaces/Shapes.html) (interface): Shapes in Mappedin JS The Shapes class allows you to draw custom 3D geometry on the map using GeoJSON. - [TAddImageOptions](https://docs.mappedin.com/web/v6/latest/types/TAddImageOptions.html) (type): Options for controlling the behavior of an Image3DView. - [TAddModel](https://docs.mappedin.com/web/v6/latest/types/TAddModel.html) (type): The target for the add model operation. - [TAddModelOptions](https://docs.mappedin.com/web/v6/latest/types/TAddModelOptions.html) (type): Options for controlling the behavior of a Model. - [TAddText3DAnchorableOptions](https://docs.mappedin.com/web/v6/latest/types/TAddText3DAnchorableOptions.html) (type): Options for adding 3D text at an anchorable target (e. - [TAddText3DOptions](https://docs.mappedin.com/web/v6/latest/interfaces/TAddText3DOptions.html) (interface) - [Text3D](https://docs.mappedin.com/web/v6/latest/interfaces/Text3D.html) (interface): Text3D in Mappedin JS Text3D creates three-dimensional text labels that are rendered directly in the 3D scene. - [Text3DView](https://docs.mappedin.com/web/v6/latest/interfaces/Text3DView.html) (interface): Class representing an Text3D on the MapView. - [TImageState](https://docs.mappedin.com/web/v6/latest/types/TImageState.html) (type) - [TImageUpdateState](https://docs.mappedin.com/web/v6/latest/types/TImageUpdateState.html) (type) - [TModelState](https://docs.mappedin.com/web/v6/latest/types/TModelState.html) (type): Represents the state of a model. - [TModelUpdateState](https://docs.mappedin.com/web/v6/latest/types/TModelUpdateState.html) (type) - [TShapeState](https://docs.mappedin.com/web/v6/latest/types/TShapeState.html) (type): Represents the state of a shape. - [TShapeUpdateState](https://docs.mappedin.com/web/v6/latest/types/TShapeUpdateState.html) (type) - [TText3DState](https://docs.mappedin.com/web/v6/latest/types/TText3DState.html) (type) - [TText3DUpdateState](https://docs.mappedin.com/web/v6/latest/types/TText3DUpdateState.html) (type) ## Map Data Objects - [Annotation](https://docs.mappedin.com/web/v6/latest/classes/Annotation.html) (class): A class representing annotation data within the map. - [Area](https://docs.mappedin.com/web/v6/latest/classes/Area.html) (class): An Area represents some grouping of multiple pieces of geometry, not necessarily bounded by walls or any other physical feature of the map. - [Connection](https://docs.mappedin.com/web/v6/latest/classes/Connection.html) (class): A class representing connection data within the map. - [Coordinate](https://docs.mappedin.com/web/v6/latest/classes/Coordinate.html) (class): Class representing a pseudo-mercator coordinate. - [DetailedMapData](https://docs.mappedin.com/web/v6/latest/classes/DetailedMapData.html) (class) - [Door](https://docs.mappedin.com/web/v6/latest/classes/Door.html) (class): A class representing door data within the map. - [DOORS](https://docs.mappedin.com/web/v6/latest/enums/DOORS.html) (enum) - [Facade](https://docs.mappedin.com/web/v6/latest/classes/Facade.html) (class): A Facade is a collection of spaces that make up the exterior representation of a Floor Stack (FloorStack). - [Floor](https://docs.mappedin.com/web/v6/latest/classes/Floor.html) (class): A class representing floor data within the map. - [FloorStack](https://docs.mappedin.com/web/v6/latest/classes/FloorStack.html) (class): A class representing floor stack data within the map. - [Hyperlink](https://docs.mappedin.com/web/v6/latest/classes/Hyperlink.html) (class): A class representing hyperlink link data within the map. - [ImageMetaData](https://docs.mappedin.com/web/v6/latest/classes/ImageMetaData.html) (class): A class representing image link data within the map. - [MapObject](https://docs.mappedin.com/web/v6/latest/classes/MapObject.html) (class): A class representing generic map object data within the map. - [Node](https://docs.mappedin.com/web/v6/latest/classes/Node.html) (class): A class representing Path node data within the map. - [PointOfInterest](https://docs.mappedin.com/web/v6/latest/classes/PointOfInterest.html) (class): A class representing point of interest data within the map. - [SiblingGroup](https://docs.mappedin.com/web/v6/latest/types/SiblingGroup.html) (type) - [Space](https://docs.mappedin.com/web/v6/latest/classes/Space.html) (class): A Space represents an area enclosed by walls, such as a hall or room. - [TCoordinateParams](https://docs.mappedin.com/web/v6/latest/types/TCoordinateParams.html) (type): Parameters for creating a Coordinate. - [TSpaceType](https://docs.mappedin.com/web/v6/latest/types/TSpaceType.html) (type): Represents the various types of spaces that can be defined within a map. - [WALLS](https://docs.mappedin.com/web/v6/latest/enums/WALLS.html) (enum) ## Search & Query - [MatchInfo](https://docs.mappedin.com/web/v6/latest/types/MatchInfo.html) (type): Match information for a search result. - [Places](https://docs.mappedin.com/web/v6/latest/types/Places.html) (type): Places are the main objects that can be searched for. - [Query](https://docs.mappedin.com/web/v6/latest/interfaces/Query.html) (interface): Query allows users to query for nodes, locations, categories, and other points of interest within the venue. - [Search](https://docs.mappedin.com/web/v6/latest/interfaces/Search.html) (interface): Search allows users to search for locations, categories, and other points of interest within the venue. - [SearchOptions](https://docs.mappedin.com/web/v6/latest/interfaces/SearchOptions.html) (interface) - [SearchResult](https://docs.mappedin.com/web/v6/latest/types/SearchResult.html) (type): Search results - [SearchResultEnterpriseCategory](https://docs.mappedin.com/web/v6/latest/interfaces/SearchResultEnterpriseCategory.html) (interface) - [SearchResultEnterpriseLocations](https://docs.mappedin.com/web/v6/latest/interfaces/SearchResultEnterpriseLocations.html) (interface) - [SearchResultItem](https://docs.mappedin.com/web/v6/latest/types/SearchResultItem.html) (type) - [SearchResultPlaces](https://docs.mappedin.com/web/v6/latest/interfaces/SearchResultPlaces.html) (interface) - [Suggestion](https://docs.mappedin.com/web/v6/latest/types/Suggestion.html) (type): The type of auto-suggestions - [TFindNearestOptions](https://docs.mappedin.com/web/v6/latest/types/TFindNearestOptions.html) (type): Options for the nearest query - [TFindNearestResult](https://docs.mappedin.com/web/v6/latest/types/TFindNearestResult.html) (type): Result of a nearest query - [TQueriables](https://docs.mappedin.com/web/v6/latest/types/TQueriables.html) (type): Types that can be queried for in the nearest search - [TSearchOptions](https://docs.mappedin.com/web/v6/latest/types/TSearchOptions.html) (type): Options for configuring search functionality. ## Events - [CaptureEventsPayloadMap](https://docs.mappedin.com/web/v6/latest/types/CaptureEventsPayloadMap.html) (type): Maps reserved analytics event names to their payload structures. - [TClickPayload](https://docs.mappedin.com/web/v6/latest/types/TClickPayload.html) (type): The payload for a user click event on the map. - [TEventPayload](https://docs.mappedin.com/web/v6/latest/types/TEventPayload.html) (type) - [TEvents](https://docs.mappedin.com/web/v6/latest/types/TEvents.html) (type): Defines the structure and types of events emitted in the context of the map. - [TFloorChangePayload](https://docs.mappedin.com/web/v6/latest/types/TFloorChangePayload.html) (type): Describes the payload delivered with floor change events. - [TFloorChangeReason](https://docs.mappedin.com/web/v6/latest/types/TFloorChangeReason.html) (type) - [THoverPayload](https://docs.mappedin.com/web/v6/latest/types/THoverPayload.html) (type): Represents the payload for a hover event on the map. ## Styling & Rendering - [ANIMATION_TWEENS](https://docs.mappedin.com/web/v6/latest/variables/ANIMATION_TWEENS.html) (variable) - [ColorString](https://docs.mappedin.com/web/v6/latest/types/ColorString.html) (type): A color string. - [Environment](https://docs.mappedin.com/web/v6/latest/types/Environment.html) (type): Represents the environment state configuration. - [EnvMapOptions](https://docs.mappedin.com/web/v6/latest/types/EnvMapOptions.html) (type) - [FootprintConfig](https://docs.mappedin.com/web/v6/latest/types/FootprintConfig.html) (type) - [InterpolateOn](https://docs.mappedin.com/web/v6/latest/types/InterpolateOn.html) (type): Different properties that can be interpolated on, and what input values are expected. - [Interpolation](https://docs.mappedin.com/web/v6/latest/types/Interpolation.html) (type): Define interpolation behavior for a value. - [LineStyle](https://docs.mappedin.com/web/v6/latest/types/LineStyle.html) (type) - [MAPPEDIN_COLORS](https://docs.mappedin.com/web/v6/latest/variables/MAPPEDIN_COLORS.html) (variable) - [MapViewState](https://docs.mappedin.com/web/v6/latest/types/MapViewState.html) (type) - [Outdoor](https://docs.mappedin.com/web/v6/latest/interfaces/Outdoor.html) (interface): The outdoor map shown around the Mappedin indoor map can be manipulated to show or hide additional information. - [OutlinesOptions](https://docs.mappedin.com/web/v6/latest/types/OutlinesOptions.html) (type): Outline rendering configuration options - [PaintStyle](https://docs.mappedin.com/web/v6/latest/types/PaintStyle.html) (type) - [RendererCoreOptions](https://docs.mappedin.com/web/v6/latest/types/RendererCoreOptions.html) (type) - [Shading](https://docs.mappedin.com/web/v6/latest/types/Shading.html) (type) - [Style](https://docs.mappedin.com/web/v6/latest/interfaces/Style.html) (interface) - [TAnimationOptions](https://docs.mappedin.com/web/v6/latest/types/TAnimationOptions.html) (type): Options for controlling animations on the map. - [TAntialiasingOptions](https://docs.mappedin.com/web/v6/latest/types/TAntialiasingOptions.html) (type): Represents all the available antialiasing options. - [TShow3DMapOptions](https://docs.mappedin.com/web/v6/latest/types/TShow3DMapOptions.html) (type): Options for showing a 3D map. - [TWallsState](https://docs.mappedin.com/web/v6/latest/types/TWallsState.html) (type) - [TWallsUpdateState](https://docs.mappedin.com/web/v6/latest/types/TWallsUpdateState.html) (type) - [VisibilityState](https://docs.mappedin.com/web/v6/latest/types/VisibilityState.html) (type) ## State Management - [getMultiFloorState](https://docs.mappedin.com/web/v6/latest/functions/getMultiFloorState.html) (function) - [GlobalState](https://docs.mappedin.com/web/v6/latest/types/GlobalState.html) (type) - [LocationState](https://docs.mappedin.com/web/v6/latest/types/LocationState.html) (type): The state of a location. - [MapElementsWithState](https://docs.mappedin.com/web/v6/latest/types/MapElementsWithState.html) (type): All map elements which have state. - [MapElementToGetRenderedState](https://docs.mappedin.com/web/v6/latest/types/MapElementToGetRenderedState.html) (type) - [MapElementToGetState](https://docs.mappedin.com/web/v6/latest/types/MapElementToGetState.html) (type): Centralized mapping of element types to their get state types. - [MapElementToUpdateState](https://docs.mappedin.com/web/v6/latest/types/MapElementToUpdateState.html) (type): Centralized mapping of element types to their update state types. - [TAnimateStateResult](https://docs.mappedin.com/web/v6/latest/types/TAnimateStateResult.html) (type) - [TDoorsState](https://docs.mappedin.com/web/v6/latest/types/TDoorsState.html) (type) - [TDoorsUpdateState](https://docs.mappedin.com/web/v6/latest/types/TDoorsUpdateState.html) (type) - [TFacadeState](https://docs.mappedin.com/web/v6/latest/types/TFacadeState.html) (type) - [TFacadeUpdateState](https://docs.mappedin.com/web/v6/latest/types/TFacadeUpdateState.html) (type) - [TFloorState](https://docs.mappedin.com/web/v6/latest/types/TFloorState.html) (type) - [TFloorUpdateState](https://docs.mappedin.com/web/v6/latest/types/TFloorUpdateState.html) (type) - [TGeometryState](https://docs.mappedin.com/web/v6/latest/types/TGeometryState.html) (type): Defines the state for geometry elements like Space when updated. - [TGeometryUpdateState](https://docs.mappedin.com/web/v6/latest/types/TGeometryUpdateState.html) (type) - [TGetState](https://docs.mappedin.com/web/v6/latest/types/TGetState.html) (type): The type for getting the state of map elements. - [TMultiFloorViewOptions](https://docs.mappedin.com/web/v6/latest/types/TMultiFloorViewOptions.html) (type): Options for controlling multi-floor view. - [TRendererState](https://docs.mappedin.com/web/v6/latest/types/TRendererState.html) (type) - [TUpdateState](https://docs.mappedin.com/web/v6/latest/types/TUpdateState.html) (type): The type for updating the state of map elements (colors, texts, etc. - [WithState](https://docs.mappedin.com/web/v6/latest/types/WithState.html) (type): Filter type that extracts only elements which have state. ## Map Data Access - [Analytics](https://docs.mappedin.com/web/v6/latest/interfaces/Analytics.html) (interface) - [IAnchorable](https://docs.mappedin.com/web/v6/latest/interfaces/IAnchorable.html) (interface): A class that implements IAnchorable can have 2D elements like Labels and Markers anchored to it. - [IFocusable](https://docs.mappedin.com/web/v6/latest/interfaces/IFocusable.html) (interface): A class that implements IFocusable can be focused on by the camera. - [IGeoJSONData](https://docs.mappedin.com/web/v6/latest/interfaces/IGeoJSONData.html) (interface): A class that implements IGeoJSONData has a underlying GeoJSON datathat can be accessed. - [INavigatable](https://docs.mappedin.com/web/v6/latest/interfaces/INavigatable.html) (interface): A class that implements INavigatable can be navigated to via directions. - [ISystemPlugin](https://docs.mappedin.com/web/v6/latest/interfaces/ISystemPlugin.html) (interface) - [MapDataElements](https://docs.mappedin.com/web/v6/latest/types/MapDataElements.html) (type): Elements created by the MapData. - [MapFeatureOfType](https://docs.mappedin.com/web/v6/latest/types/MapFeatureOfType.html) (type): Returns the class type for a given type string. - [MapViewElements](https://docs.mappedin.com/web/v6/latest/types/MapViewElements.html) (type): Elements created by the MapView. - [TAnalyticsUpdateState](https://docs.mappedin.com/web/v6/latest/interfaces/TAnalyticsUpdateState.html) (interface): Options for updating the current state of analytics. - [TGetMapDataOptions](https://docs.mappedin.com/web/v6/latest/types/TGetMapDataOptions.html) (type) - [TGetMapDataSharedOptions](https://docs.mappedin.com/web/v6/latest/types/TGetMapDataSharedOptions.html) (type) - [TGetMapDataWithAccessTokenOptions](https://docs.mappedin.com/web/v6/latest/interfaces/TGetMapDataWithAccessTokenOptions.html) (interface) - [TGetMapDataWithCredentialsOptions](https://docs.mappedin.com/web/v6/latest/interfaces/TGetMapDataWithCredentialsOptions.html) (interface): Fetch map data using a key/secret pair and additional options. - [THydrateMapDataBundle](https://docs.mappedin.com/web/v6/latest/types/THydrateMapDataBundle.html) (type) - [TMapDataEvents](https://docs.mappedin.com/web/v6/latest/types/TMapDataEvents.html) (type) - [TMapDataObjectTypes](https://docs.mappedin.com/web/v6/latest/types/TMapDataObjectTypes.html) (type): Associates MapData type strings with their corresponding classes. - [TMapFeatureTypes](https://docs.mappedin.com/web/v6/latest/types/TMapFeatureTypes.html) (type): Associates MapData and MapView type strings with their corresponding classes. - [TMapViewObjectTypes](https://docs.mappedin.com/web/v6/latest/types/TMapViewObjectTypes.html) (type): Associates MapView type strings with their corresponding classes. ## GeoJSON Types - [BBox](https://docs.mappedin.com/web/v6/latest/types/BBox.html) (type): Bounding box https://tools. - [Feature](https://docs.mappedin.com/web/v6/latest/interfaces/Feature.html) (interface): A feature object which contains a geometry and associated properties. - [FeatureCollection](https://docs.mappedin.com/web/v6/latest/interfaces/FeatureCollection.html) (interface): A collection of feature objects. - [GeoJSON](https://docs.mappedin.com/web/v6/latest/types/GeoJSON.html) (type): Union of GeoJSON objects. - [GeoJsonGeometryTypes](https://docs.mappedin.com/web/v6/latest/types/GeoJsonGeometryTypes.html) (type): The valid values for the "type" property of GeoJSON geometry objects. - [GeoJsonObject](https://docs.mappedin.com/web/v6/latest/interfaces/GeoJsonObject.html) (interface): The base GeoJSON object. - [GeoJsonProperties](https://docs.mappedin.com/web/v6/latest/types/GeoJsonProperties.html) (type) - [GeoJsonTypes](https://docs.mappedin.com/web/v6/latest/types/GeoJsonTypes.html) (type): The value values for the "type" property of GeoJSON Objects. - [Geometry](https://docs.mappedin.com/web/v6/latest/types/Geometry.html) (type): Geometry object. - [GeometryCollection](https://docs.mappedin.com/web/v6/latest/interfaces/GeometryCollection.html) (interface): Geometry Collection https://tools. - [GeometryObject](https://docs.mappedin.com/web/v6/latest/types/GeometryObject.html) (type) - [LineString](https://docs.mappedin.com/web/v6/latest/interfaces/LineString.html) (interface): LineString geometry object. - [MultiLineString](https://docs.mappedin.com/web/v6/latest/interfaces/MultiLineString.html) (interface): MultiLineString geometry object. - [MultiPoint](https://docs.mappedin.com/web/v6/latest/interfaces/MultiPoint.html) (interface): MultiPoint geometry object. - [MultiPolygon](https://docs.mappedin.com/web/v6/latest/interfaces/MultiPolygon.html) (interface): MultiPolygon geometry object. - [Point](https://docs.mappedin.com/web/v6/latest/interfaces/Point.html) (interface): Point geometry object. - [Polygon](https://docs.mappedin.com/web/v6/latest/interfaces/Polygon.html) (interface): Polygon geometry object. - [Position](https://docs.mappedin.com/web/v6/latest/types/Position.html) (type): A Position is an array of coordinates. - [TMVF](https://docs.mappedin.com/web/v6/latest/types/TMVF.html) (type) - [TMVFLineStringStyle](https://docs.mappedin.com/web/v6/latest/types/TMVFLineStringStyle.html) (type) - [TMVFPointStyle](https://docs.mappedin.com/web/v6/latest/types/TMVFPointStyle.html) (type) - [TMVFPolygonStyle](https://docs.mappedin.com/web/v6/latest/types/TMVFPolygonStyle.html) (type) - [TMVFStyle](https://docs.mappedin.com/web/v6/latest/types/TMVFStyle.html) (type) - [TMVFStyleCollection](https://docs.mappedin.com/web/v6/latest/types/TMVFStyleCollection.html) (type): A map of layer styles, where keys represent the group IDs of each style. ## API Reference - [__INTERNAL__MapLibreOverlay](https://docs.mappedin.com/web/v6/latest/classes/__INTERNAL__MapLibreOverlay.html) (class): Generic PubSub class implementing the Publish-Subscribe pattern for event handling. - [Debug](https://docs.mappedin.com/web/v6/latest/interfaces/Debug.html) (interface) - [findPreferredLanguageInVenue](https://docs.mappedin.com/web/v6/latest/functions/findPreferredLanguageInVenue.html) (function) - [OpeningHours](https://docs.mappedin.com/web/v6/latest/interfaces/OpeningHours.html) (interface): Represents the opening hours of a location. - [setWorkersUrl](https://docs.mappedin.com/web/v6/latest/functions/setWorkersUrl.html) (function) - [TWatermarkOptions](https://docs.mappedin.com/web/v6/latest/interfaces/TWatermarkOptions.html) (interface): Options for the watermark. - [unzipAndParseMVFv2](https://docs.mappedin.com/web/v6/latest/functions/unzipAndParseMVFv2.html) (function) ## Types & Configuration - [ACTION_TYPE](https://docs.mappedin.com/web/v6/latest/enums/ACTION_TYPE.html) (enum) - [AutoElements](https://docs.mappedin.com/web/v6/latest/types/AutoElements.html) (type) - [E_SDK_LOG_LEVEL](https://docs.mappedin.com/web/v6/latest/enums/E_SDK_LOG_LEVEL.html) (enum) - [LocationSocial](https://docs.mappedin.com/web/v6/latest/types/LocationSocial.html) (type) - [OperationHours](https://docs.mappedin.com/web/v6/latest/types/OperationHours.html) (type): We (almost) follow this schema (http://schema. - [TActionType](https://docs.mappedin.com/web/v6/latest/types/TActionType.html) (type) - [TCancellablePromise](https://docs.mappedin.com/web/v6/latest/types/TCancellablePromise.html) (type) - [TEasingFunction](https://docs.mappedin.com/web/v6/latest/types/TEasingFunction.html) (type): Types of easing for animations. - [TFindPreferredLanguageInVenueOptions](https://docs.mappedin.com/web/v6/latest/types/TFindPreferredLanguageInVenueOptions.html) (type) - [TQueryAtResult](https://docs.mappedin.com/web/v6/latest/types/TQueryAtResult.html) (type): Types that can be returned from Query. - [TSetFloorOptions](https://docs.mappedin.com/web/v6/latest/types/TSetFloorOptions.html) (type) - [TTakeScreenshotOptions](https://docs.mappedin.com/web/v6/latest/types/TTakeScreenshotOptions.html) (type): Options for taking a screenshot. ## Quick Reference Examples ### Zip File / Unknown Data Source (RECOMMENDED for offline bundles) ```typescript import { hydrateMapData, show3dMap } from '@mappedin/mappedin-js'; // Load map from a zip/bundle file const response = await fetch('map-bundle.zip'); const buffer = new Uint8Array(await response.arrayBuffer()); const mapData = await hydrateMapData({ type: 'binary', main: buffer }); const mapView = await show3dMap(document.getElementById('map'), mapData); // IMPORTANT: Check isEnterpriseMode to determine which data types to use // This ensures your code works with ANY zip file regardless of data source const locations = mapData.isEnterpriseMode ? mapData.getByType('enterprise-location') : mapData.getByType('location-profile'); const categories = mapData.isEnterpriseMode ? mapData.getByType('enterprise-category') : mapData.getByType('location-category'); // Enterprise-only: venue metadata const venue = mapData.isEnterpriseMode ? mapData.getByType('enterprise-venue') : undefined; // Now use locations/categories regardless of data source locations.forEach(loc => console.log(loc.name)); ``` ### Maker Example (keys starting with mik_) ```typescript import { getMapData, show3dMap } from '@mappedin/mappedin-js'; const mapData = await getMapData({ key: 'mik_xxx', secret: 'mis_xxx', mapId: '65c0ff7430b94e3fabd5bb8c' }); const mapView = await show3dMap(document.getElementById('map'), mapData); // Access locations using location-profile for Maker data const locations = mapData.getByType('location-profile'); const categories = mapData.getByType('location-category'); ``` ### CMS/Enterprise Example (clientId/clientSecret) ```typescript import { getMapData, show3dMap } from '@mappedin/mappedin-js'; const mapData = await getMapData({ key: 'your-client-id', secret: 'your-client-secret', mapId: 'mappedin-demo-mall' }); const mapView = await show3dMap(document.getElementById('map'), mapData); // Access locations using enterprise-location for CMS data const locations = mapData.getByType('enterprise-location'); const categories = mapData.getByType('enterprise-category'); const venue = mapData.getByType('enterprise-venue'); ```