Skip to main content

Web SDK

Changelog for MapsIndoors SDK for JavaScript. This document structure is based on Keep a Changelog and the project adheres to Semantic Versioning.

[4.21.4] - 2023-02-22

Changed

  • The light setup for 3D models for a more accurate color representation.

Fixed

  • The issue that caused the 3D models to blink when panning the map.

[4.21.3] - 2023-02-22

Added

  • Support for Solution Config
  • Support for Settings 3D

Changed

  • Updated the MapsPeople logo

Fixed

  • Fixed a bug occurring when using deallocate with the map
  • Aligned 3D rotation across platforms
  • Fixed timing issue for 2D and 3D layers on Mapbox.

[4.21.2] - 2023-02-22

Fixed

  • Fix slow animation in Mapbox when fitting to new map bounds.

[4.21.1] - 2022-12-13

Fixed

  • Fix a bug where wrong or flickering MapsIndoors tiles were sometimes shown on a Google Maps map.
  • MapsIndoors tiles will now be correctly changed when changing the MapsIndoors API key.

[4.21.0] - 2022-10-27

Added

  • Support for getting locations by external ID.

[4.20.2] - 2022-10-25

Fixed

  • Fix bug where a runtime 3D model URL change would not render the new model.

[4.20.1] - 2022-10-11

Fixed

  • Fix a bug where the wrong floor was sometimes shown.

[4.20.0] - 2022-10-06

Added

  • Support for 2D models on Mapbox maps.

[4.19.0] - 2022-09-29

Added

  • Support for 2D models on Google maps.

Changed

  • MICommon has been updated to the latest version.

[4.18.1] - 2022-09-07

Fixed

  • Labels are now centered when the icon is not visible.

[4.18.0] - 2022-08-31

Added

  • Support for wall extrusions, room extrusions, and 3D models on Mapbox maps.

[4.17.7] - 2022-07-12

Fixed

  • Device position dot and circle are now always shown no matter how PositionControl.watchPosition is invoked.

[4.17.6] - 2022-04-22

Fixed

  • Fix bug where Live Data badges on locations were not always removed when disabling a Live Data Domain.

[4.17.5] - 2022-04-13

Fixed

  • Creating MPBooking objects now works again.

[4.17.4] - 2022-04-11

Fixed

  • Animated directions will now always start when rendering a route, and will also render on a per-leg level.

[4.17.3] - 2022-04-05

Fixed

  • Renamed the labelTemplate property on the DefaultDisplayRule to label to match with the DisplayRule interface.
  • Fix bug where directions line on a Mapbox map in some instances would not be rendered.
  • Add missing documentation of required parameter in the mapsindoors.directions.MapboxProvider.
  • Fix bug where the set language was not used when requesting Mapbox directions.

[4.17.2] - 2022-02-03

Fixed

  • Locations receiving Live Data position updates will no longer disappear when panning the map.
  • Live Data is now correctly resumed with the most recent updates when changing user role.
  • Floor Selector styles are no longer missing.

[4.17.1] - 2022-01-13

Fixed

  • In some cases, the MapsPeople logo would not be visible.
  • All icons are now added to MapBox, to prevent the "Image ... could not be loaded." warning in the console.
  • strokeFill, strokeColor, and strokeWeight is now correctly applied when using setBuildingOutlineOptions().

[4.17.0] - 2021-12-21

Added

  • User authenticated booking.

Fixed

  • Label and icon can now be visible at different zoom level ranges.

[4.16.0] - 2021-12-07

Added

  • Disabling Live Data will now remove badges from icons when using the default callback.

Fixed

  • In some cases, when adding the MapsPeople logo to the map, the SDK would throw an error.
  • Live Data now sends correct Http headers.
  • LiveDataInfo.activeDomainTypes() now always returns a promise.

[4.15.0] - 2021-11-18

Added

  • Labels on Google Maps now support line breaks. A label containing \n will now be broken into two lines.
  • labelMaxWidth on DisplayRule sets the max-width in px for a label. Longer labels will be wrapped over multiple lines.

[4.14.1] - 2021-11-03

Fixed

  • AppUserRoles set via MapsIndoors.setUserRoles is now applied when calling DirectionsService.getRoute

[4.14.0] - 2021-09-13

Changed

  • Updated the JSDOC template used for the reference guide.

Added

  • The LocationsService now supports filtering by Location type. (mapsindoors.services.LocationsService.getLocations({types: ['Staris']})).
  • synchronizeContent() has been added to MapsIndoors as a static member. It will synchronize the MapsIndoors data from the backend to the client when called.

[4.13.0] - 2021-08-17

Added

  • Animated directions for MapBox

Fixed

  • The "Uncaught (in promise) TypeError: Cannot read property 'flush' of undefined" error.

[4.12.1] - 2021-06-24

Fixed

  • Location icons are now internally requested with size parameters instead of scale.

[4.12.0] - 2021-06-17

Added

  • Support for (and default rendering of) Live Data Domain Types co2 and humidity.
  • The Location id is now added to the request when deleting a booking.

Fixed

  • Reduce icon flicker when applying Live Data badges.
  • Default badge rendering of unknown Live Data Occupancy can now handle unknown number of people.
  • In some cases setting the stroke- and fill-opacity for a Location Type would fail.

[4.11.2] - 2021-06-03

Fixed

  • Calling mapsindoors.MapsIndoors.setLanguage() will now trigger a refresh of the cached Locations.
  • Reduces the amount of HTTP requests when using Live Data.

[4.11.1] - 2021-05-27

Fixed

  • The radius combined with the near parameter will now reduce the number of Locations returned by LocationsService.getLocations() to those within that radius from the location (MapsIndoors Location or latitude/longitude) specified by near.
  • The LocationsService will now log usage statistics.

[4.11.0] - 2021-05-20

Added

  • Support for (and default rendering of) Live Data Domain Types temperature and count.

Fixed

  • The default Live Data badge rendering is now based on Domain Type hierarchy: availability+occupancy > availability > occupancy > temperature > count.
  • The default label styling has been refreshed and is now aligned with out showcase web app.

[4.10.0] - 2021-05-18

Added

  • Animated directions for Google Maps.

Fixed

  • A bug that caused the outdoor parts of the directions polyline to not be shown if the current Floor Index wasn't 0.

[4.9.1] - 2021-05-05

Fixed

  • A bug that caused icons with Live Data badges to look unsharp/fuzzy.
  • A timing issue that could cause a TypeError: Cannot read property 'toString' of undefined error in the console.

[4.9.0] - 2021-04-28

Added

  • deallocate method on MapsIndoors class that will clean up and release resources associated with the MapsIndoors instance.

[4.8.1] - 2021-04-28

Fixed

  • A bug in the DirectionsService that would cause routes between Venues to fail.
  • A bug in the styling of labels that prevented the ShadowBlur from being changed.
  • A bug in the styling of labels where strokeStyle would not be applied for labels on Google Maps.

[4.8.0] - 2021-04-19

Added

  • SDK Event logging.

Fixed

  • Labels are now clickable on Google Maps.
  • The directions steps are now aligned across the different directions providers.

[4.7.0] - 2021-04-12

Added

  • Live Data icon badges can now show badges that combine info from both the Occupancy and Availability Domains.
  • The LocationsService will now emit a update_completed event when data has been synchronized with the backend.

Fixed

  • Fixed a bug in DirectionsRenderer, that could cause a route polyline not to be shown on the map.
  • Fixed label placement for Mapbox, so they are placed in the same location as labels on Google Maps.
  • Fixed a bug in the processing of display rules, that caused room polygons not to be clickable.
  • Fixed maxZoom offset for MapBoxView.

[4.6.2] - 2021-03-15

Fixed

  • A bug in the processing of display rules caused some locations to be missing from the map.

[4.6.1] - 2021-03-11

Fixed

  • Fixing an issue where the Location Service in some circumstances wouldn't return Locations
  • Fixed bug where Live Data was not shown

[4.6.0] - 2021-03-01

Added

  • Areas - It's now possible to render Areas on the map using Display Rules.

[4.5.2] - 2021-02-23

Fixed

  • MICommon updated to 2.1.0 with improved distance/text ranking correlation.

[4.5.1] - 2021-02-16

Fixed

  • A bug in the directions renderer where directions going from a POI not on the ground floor to an external address would not render correctly on the map.

[4.5.0] - 2021-02-01

Added

  • Booking service - Adds support for booking of Locations. It requires integration to a calendar provider e.g. Google Calendar for this to work. For more information about our Booking service and how to get started, please contact our sales team.

Fixed

  • Prevent crash in case of nonexisting venue on location
  • Prevent crash in case of rendering badge on nonexisting icon
  • Improved distance/text ranking correlation (micommon)
  • In some cases the route step would have a wrong travel mode when routing from one venue to another.

[4.4.0] - 2021-01-11

Added

  • fitBoundsPadding has been added as an optional parameter to the DirectionsRenderer constructor. It can be used to add a padding around the route when the map is fitted to a route leg or route step.
  • Step switching has been added to the DirectionsRenderer. It is now possible to call nextStep() or previousStep() to navigate between each step of the route. setStepIndex(stepIndex, legIndex) can be used to set the renderer to a specific step on a specific leg. If the legIndex is not specified then the current legIndex is used.

Fixed

  • External IDs are now searchable.
  • Updated the documentation for the BuildingOutlineOptions.
  • getBuildingOutlineOptions() no longer returns undefined.
  • The optional parameters for DirectionsRenderer will now have an effect when set in the constructor.
  • Updated the documentation for LabelOptions. Added missing fontWeight property. Do note that fontWeight is not supported by MapBox.

[4.3.1] - 2021-01-06

Fixed

  • Fixed wrong icon scale calculation.

[4.3.0] - 2021-01-04

Added

  • LiveDataInfo class for checking if live data domain type is available on the loaded solution.

Changed

  • LiveDataManager enableLiveData() and subscribe() will no longer attempt to make subscription if the live data domain type is not available on the solution.

Fixed

  • Prevent faulty travel modes when getting directions inside MapsIndoors venues.

[4.2.1] - 2020-12-17

Fixed

  • The Directions Service would in some cases not return the most optimal route.

[4.2.0] - 2020-12-16

Added

  • Support for Live Data via a new mapsindoors.LiveDataManager class. For more information about Live Data and how to get started, please contact our sales team.
  • mapsindoors.BadgeRenderer helper class to apply a badge onto an image.
  • Support for overriding a display rule and removing the override again (overrideDisplayRule(), revertDisplayRule()).
  • Optional ignoreOverrides parameter on getDisplayRule (defaults to false).

[4.1.5] - 2020-12-17

Fixed

  • The Directions Service would in some cases not return the most optimal route.

[4.1.4] - 2020-12-16

Fixed

  • Google Maps will enable zoom level 22 by default if the maxZoom is not specified. The SDK will now set maxZoom to 21 if maxZoom hasn't been specified when creating the MapView.

[4.1.3] - 2020-12-15

Fixed

  • An issue where the default styling of labels would render almost unreadable labels.
  • An issue where the My Position icon didn't follow the users' movement.
  • Improved internal caching of the services to reduce network traffic.
  • Improved performance of the ViewState.

Changed

  • The SDK will now check if the 'z22' module is enabled and set the max zoom on the MapView to 22 unless the MapView is initialized with max zoom specified. (Contact our sales team to hear more about this feature).
  • The default color of the building outlines to #EF6CCE.
  • The default color for the Directions Renderer to #3071D9.
  • MICommon has been updated to the latest version.

[4.1.2] - 2020-12-03

Fixed

  • An issue where directions between two venues would cause an error.

Changed

  • Minor updates of the documentation.

[4.1.1] - 2020-11-20

Fixed

  • An issue where the Directions polyline would visible on all floors.

[4.1.0] - 2020-11-12

Added

  • Added static functions setUserRoles and getUserRoles to the MapsIndoors object. mapsindoors.MapsIndoors.setUserRoles() and mapsindoors.MapsIndoors.getUserRoles().
  • Added start_context and end_context properties to MapsIndoors directions steps. The properties contain references to the venue, building, and floor for a given start or end location for a given step.

Changed

  • The MapsIndoors Directions Provider now uses the globaly set userRoles. The userRoles parameter on the Directions service if set will override this.
  • MICommon have been updated to the latest version.

Fixed

  • The Google Map is now properly shown even though map center is not set.
  • An issue when the user clicked a room on a Google Map the click event would return null as the location property.
  • An issue where settting floor early would cause wrong map tiles to be shown.

[4.0.0] - 2020-10-29

The MapsIndoors JavaScript SDK V4 can now be used with Google Maps and Mapbox GL JS. It introduces several breaking changes, so read this carefully.

Added

Classes

mapView classes that acts as map library adapters (map creation and common interface) to MapsIndoors:

  • mapsindoors.mapView.GoogleMapsView: mapView for Google Maps.
  • mapsindoors.mapView.MapboxView: mapView for Mapbox GL JS.

Methods

  • mapsIndoors.getFilter() returns the array of locations ids that the locations on the map are currently filtered by.

Events

  • venue_changed event on MapsIndoors that fires if the venue changes after calling mapsIndoors.setVenue().

Changed

MapsIndoors class

Instantiation:

  • Create an instance of a mapView, either mapsindoors.mapView.GoogleMapsView or mapsindoors.mapView.MapboxView.
  • Then create an instance of MapsIndoors like this: const mapsIndoors = new mapsindoors.MapsIndoors({mapView: mapViewInstance});.

Methods:

  • setApiKey() is renamed to setMapsIndoorsApiKey().
  • getMapStyle() is renamed to getMapIndoorsStyle().
  • getMapStyles() is renamed to getMapIndoorsStyles().

Services

  • All services (DistanceMatrixService, GeoCodeService, LocationsService, AppConfigService, DirectionsService, ShareService, SolutionsService, VenuesService) must now be accessed by the mapsindoors.services namespace, eg. mapsindoors.services.AppConfigService.

DirectionsService

  • The class must now be instantiated and given an instance of en external directions provider, either mapsindoors.directions.GoogleMapsProvider or mapsindoors.directions.MapboxProvider.
  • A route Leg now encompasses a part of a route until a change in floor level, no matter the travel mode.
  • Step.abutters is changed to Step.route_context, and the value OutsideOnVenue is now always Outside.
  • All steps from an external directions provider will have routeContext set to Outside.
  • The route results (and the legs) now includes a geometry object that contains a GeoJSON LineString for the route or leg.

Directions renderer

  • DirectionsRenderer class must now be accessed under the directions namespace, i.e. mapsindoors.directions.DirectionsRenderer.
  • DirectionsRenderer no longer requires the map as a constructor parameter.

Removed

  • MapsIndoors.setMap() is removed.
  • DirectionsRenderer.getMap() is removed.
  • zIndex is removed on DirectionsRendererOptions.