Packages
@mappedin/blue-dot: 6.27.0-beta.0@mappedin/dynamic-focus: 6.27.0-beta.0@mappedin/events: 6.27.0-beta.0@mappedin/icons: 8.4.1@mappedin/mappedin-js: 6.27.0
Features
-
Upgraded to Mappedin JS v6.27.0
-
Added
Labels.getAll, which returns everyLabelcurrently on the map.
mapView.labels.getAll { result in
if case .success(let labels) = result {
print("\(labels.count) labels on the map")
}
}
- Added
scalingStrategytoBlueDotOptions.AccuracyRingandBlueDotState.AccuracyRingState. The defaultAccuracyRingScalePreset.trueScalekeeps the ring at the reported accuracy in real-world metres.AccuracyRingScalePreset.clampViewportcaps the ring diameter at 60% of the smaller viewport dimension so a coarse GPS fix does not swallow the map.
mapView.blueDot.enable(
options: BlueDotOptions(
accuracyRing: BlueDotOptions.AccuracyRing(
scalingStrategy: .clampViewport
)
)
)
- Added
Events.longPress, which fires after a tap is held in place for approximately 500 milliseconds without panning or a second finger. The payload is aClickPayload, matchingEvents.click. A long-press does not also emitEvents.click.
mapView.on(Events.longPress) { payload in
if let space = payload?.space {
print("Long-pressed \(space.name)")
}
}
- Added
MapData.checkForUpdates, which checks whether the map data has changed since it was loaded without downloading the full bundle. It returns aCheckForUpdatesResultwithhasChangesandupdatedAt. Maps hydrated from a local bundle viahydrateMapDatado not have a load-time timestamp and will fail. - Added
MapData.updatedAt, which returns the timestamp reported by the API when the map data was loaded.
mapData.checkForUpdates { result in
switch result {
case .success(let update):
if update?.hasChanges == true {
// re-load with getMapData
}
case .failure(let error):
print("Error: \(error)")
}
}
Performance
- Improved
Query.nearestperformance in travel-distance mode, especially when searching many destinations across all floors.
Fixes
- Fixed an issue where
Markers.getAllomittedMarkers anchored to aSpace,Door,Node, or other non-coordinate target. - Fixed an issue where
Query.nearestwithmodeset to.travelDistanceandlimitset to.allFloorsranked destinations by straight-line distance instead of travel distance, so a destination on another floor could be chosen over a nearby one on the same floor. - Fixed an issue where
Camera.focusOnin outdoor mode ignoredscreenOffsetsand inset padding, so the camera centred on the full viewport instead of the visible map area. - Fixed an issue where direction arrows on short sloped connection
Paths, such as escalators, appeared stretched. - Fixed an issue where a two-finger pinch fired a map
Events.click. - Fixed an issue where panning the camera fired
Events.cameraChangetwice for each movement. - Fixed an issue where simplified
Paths could curve through nearby obstacles instead of taking a straight line from start to end.