Mappedin SDK for iOS & Android v6.9.0

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 every Label currently on the map.

mapView.labels.getAll { result in
    if case .success(let labels) = result {
        print("\(labels.count) labels on the map")
    }
}
  • Added scalingStrategy to BlueDotOptions.AccuracyRing and BlueDotState.AccuracyRingState. The default AccuracyRingScalePreset.trueScale keeps the ring at the reported accuracy in real-world metres. AccuracyRingScalePreset.clampViewport caps 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 a ClickPayload, matching Events.click. A long-press does not also emit Events.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 a CheckForUpdatesResult with hasChanges and updatedAt. Maps hydrated from a local bundle via hydrateMapData do 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.nearest performance in travel-distance mode, especially when searching many destinations across all floors.

Fixes

  • Fixed an issue where Markers.getAll omitted Markers anchored to a Space, Door, Node, or other non-coordinate target.
  • Fixed an issue where Query.nearest with mode set to .travelDistance and limit set to .allFloors ranked 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.focusOn in outdoor mode ignored screenOffsets and 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.cameraChange twice for each movement.
  • Fixed an issue where simplified Paths could curve through nearby obstacles instead of taking a straight line from start to end.