Offline Routing Issue with Mappedin SDK using hydrateMapData()
Hi Team,
We are implementing offline indoor navigation using Mappedin in an Angular application.
Current setup:
Angular frontend
Offline MVF ZIP loading
Using hydrateMapData()
No cloud APIs during runtime
ZIP loaded locally from /assets/MVF2.zip or MappedInV3.zip
Map rendering works correctly offline:
Floors render
Labels render
Floor switching works
Connections/markers are visible
However, routing/directions are not working properly.
getDirections() returns empty coordinates OR no route
Rendering works offline
We confirmed map assets load successfully using hydrateMapData()
Internet is fully disconnected during testing
Questions:
Does offline routing require additional navigation graph exports?
Are space objects the correct entities to pass into getDirections()?
Can point-of-interest or connection objects be used as route endpoints?
Is there any difference between MVF2 and V3 exports for offline navigation support?
Does offline routing require specific export settings from Mappedin CMS?
We also noticed:
connection entities exist
node entities exist
walkable data exists in the V3 export
But routing still fails.
Any guidance on:
required offline export structure
correct route endpoint entities
offline routing compatibility
would be very helpful.
Thank you.
Directions are calculated locally in Mappedin JS, the user doesn’t need to be online. It should work when loading an MVF directly.
How are you obtaining the MVF file? The option to download it from within Mappedin Maker does not include the node graph required for navigation. These take some time to generate and are not in the “preview” MVF files downloaded this way. To access a complete MVF file, use the steps here: Getting Started with MVF v3 I know you did mention Mappedin CMS, so this may not be applicable to you but I wanted to point it out to be sure.
You can navigate to/from any NavigationTarget, which does include Spaces. However, note that the origin and destination must be routable between one another. For example if one is a located inside a room with no doors, getting directions would fail.
Are you seeing problems getting directions between specific targets or is it failing for all? If all, can you share your map ID (sending that as a direct message is fine).
Thank you for all the detail you’ve provided. It helps a lot to understand what you’re building. I’ve numbered my answers to match your questions.
First set:
The MVF format does contain full offline routing support, but not every MVF will include this. The MVF you download using our REST APIs does. The MVF you download from the Mappedin Maker user interface does not. The one downloaded from the UI contains geometry only.
The MVF file you download from the Mappedin REST APIs will support offline navigation.
The .id values should be consider ephemeral. They can be used during runtime, but can and will change as map edits are made. Constant identifiers can be populated as external IDs and accessed using the .externalId fields. Think of these like a foreign key that holds an identifier in your system. These won’t change unless a person manually edits them on the map.
Yes, most APIs require the full floor object and not just the id.
The externalId field is a stable identifier that can remain constant through reloads. See #3 for more detail.
Second set of answers for the update questions. A few of these duplicate concepts described above, so some answers reference those in the first set.
To update your offline venue data, download and replace the MVF file using Mappedin’s REST APIs.
Yes.
Incremental updates are not supported. You’ll need to download the MVF zip file again.
As described in the first section, make use of externalId fields to hold constant values that are keys to your own data.
No, see #3 in the first set of questions.
externalId
The Mappedin REST API that you query to get the MVF file contains a last updated date and time. You can use this for versioning. Mappedin does not apply any version number to maps.
Since you need to download the entire MVF file to get the update all updates will be included.
This same approach can be followed using any of Mappedin SDKs (Mappedin JS, Mappedin React SDK, Mappedin SDK for React Native, Mappedin SDK for Android & Mappedin SDK for iOS). They all use a similar architecture and API design.
Let me know if you’d like more information on any of these concepts
Hi msohm, We are developing applications for Windows (.exe), Android, and Web platforms. We would like to integrate the Mappedin SDK for map rendering and navigation.
What is the best approach for supporting all platforms? Can a similar implementation pattern be followed across Mappedin JS, React SDK, Android SDK, and iOS SDK?
Our SDKs follow a similar architecture and API naming, allowing for the same apps to be created using any of them.
The choice of which SDK to use really comes down to where the app will be hosted (website, vs local app) and what language you want to use to create it.
I am trying to download the MVF_JWT data for a venue using the Mappedin API.
I am able to successfully generate a JWT token using my API key and secret. However, when I try to download the MVF data for the venue, I receive the following error:
The API key used to create the token must be from the same workspace as the map you are requesting the MVF for. Keys are granted access to a single workspace.
The map you are requesting must also be upgraded to a Pro or Enterprise map in order to access it Mappedin SDKs and APIs.