01 — For app developers
Embed an event map in your app
If you build the event app, you do not need to build a map. Embed the STUMaps event map in a WebView, talk to it through a small JavaScript bridge and open it from deep links.
02 — WebView
WebView embedding in four steps
-
Open the map URL
Load the event’s map URL in WKWebView (iOS), WebView (Android) or react-native-webview. Pass ?lang= to match the app language.
-
Register the handler
Add the message handler named in the map config (iOS) or a JavaScript interface (Android); React Native receives onMessage.
-
Wait for “ready”
The map sends ready with the bridge version once it can take commands.
-
Call and listen
Open places and build routes from native screens; react to the events the map sends back.
03 — JavaScript
The JavaScript bridge
The map exposes an object on window with three commands. Each returns false when the place or language is unknown.
const map = window.NoctaraRunMap; // name from the map config
map.open('water-5'); // true | false
map.route('tram-wawel-01', 'start');
map.setLang('pl');
// iOS: webkit.messageHandlers[...] Android: JavaScript interface
// React Native: ReactNativeWebView.postMessage
{ source: 'noctara-run-map', type: 'route_built', payload: { from, to, meters, seconds, floors } } Events back to the app: ready, poi_opened, route_built (with metres, seconds and floors), share_image and share_link — so the app can use its own share sheet.
04 — URL
Deep links
Every state worth sharing is a URL, so a QR code, a push notification or a button can open it.
?poi=<id> | open a place card |
?from=<id>&to=<id> | show a walking route |
?lang=en|pl|ru | interface language |
?stepfree=1 | step-free routes from the start |
?kiosk=1 | kiosk mode for an info screen |
?runner=<bib> | a runner’s card (race maps) |
05 — WKWebView · Android WebView
Honest limitations
Three things a WebView cannot do on its own — and how they are handled.
-
Web push does not work in a WebView
Push notifications are sent by your app. The map provides an API or a webhook so your push service can send its alerts; this is set up per project.
-
Offline in iOS WKWebView needs App-Bound Domains
The service worker that keeps the map offline only runs in WKWebView for domains listed as App-Bound Domains in the app. Without them the map still works online.
-
Location and camera are granted by the app
The WebView can only use location or the camera (for QR codes) when the app has the permission and passes it on to the WebView.
06 — FAQ
Questions
Does the map need an SDK?
No. It is a web page; the bridge is plain JavaScript messages between the page and your app.
Can the map match our app’s design?
Colours for light and dark themes, fonts, logo and wording come from the map configuration.
What if our app is built with React Native?
Use react-native-webview: the map posts its events to ReactNativeWebView, and you call the bridge with injectJavaScript.
Have a venue in mind?
Send the plan and the dates, and we will reply with what a map for your venue would take.