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.
Were you testing with an MVF file that was generated shortly after edits were made to the map? If so try downloading the latest MVF and try again.
The navigation path network may take 5-10 minutes to update after the last map edit is made. New MVFs with geometry updates can get produced more quickly while edits are being made.
I’m experiencing an issue with offline routing in Mappedin.
We are using the Mappedin SDK in offline mode with an MVF file. Online routing correctly returns the shortest path, but offline routing using the same start and destination returns a longer route or an incorrect path. The same application code is used for both online and offline modes First Image Offline, Second Image is Online
Any guidance on the possible cause or recommended troubleshooting steps would be greatly appreciated.
What is the map ID you are seeing this on? Have you downloaded a new MVF to use offline? What version of MVF are you using (2 or 3)? How is the MVF downloaded, through the REST API or from the map editor UI?
Thanks for this, I was able to reproduce it and we’ll fix it in a future release (likely the next one).
To work around it for now you can pass your key and secret to the hydrateMapData function. They aren’t required since the whole MVFv3 file is being supplied, but it will work around the issue of an incorrect map configuration being used.
Could you please provide an estimated timeline (ETA) for when this issue is expected to be resolved?
Our infrastructure is designed to run entirely in offline mode, and offline routing is a critical requirement for our deployment. We have already committed this functionality to our end users, and the current issue is impacting our project delivery. map id - 69dcda2106aa5c000bc0013c
Could you please let us know:
Is there an ETA for a permanent fix?
Is this issue expected to be resolved in the next SDK release or through an updated offline (MVF) export?
Is there any recommended workaround that provides accurate offline routing until the fix is available?
We would appreciate any update you can share, as it will help us plan our deployment and communicate realistic timelines to our customers.
The issue will be fixed in the next Mappedin JS release, which will be available this month. You’ll need to pick up that update for the fix. Nothing related to the MVF export or the MVF itself needs to change.
In my post above I mentioned you can work around it by passing the key and secret in theTGetMapDataOptions you provide to hydrateMapData(). The map will still load offline and not require connectivity.
What this workaround is doing is informing hydrateMapData() that the map was created in Mappedin Maker and not Mappedin CMS, each which have a different key format. The map authoring source affects how Mappedin JS calculates directions.
Could you please provide an estimated resolution date for this issue? We need to communicate an expected timeline to our end users, so having an approximate ETA would be very helpful for planning and setting expectations.
We understand that exact timelines may not always be possible, but even an estimated target date would be greatly appreciated.