May an extension read the offline map store, and is there a supported way to get the road network ahead?
I built a coaching extension that computes per-segment power and speed targets from rider physics. Using karoo-ext 1.1.9, OnNavigationState gives me everything I need while a route is loaded: polyline, routeElevationPolyline and climbs all work well on a Karoo 2.
Many riders using it don't load a route. For them I'd like the road network ahead of the rider so I can look ahead to the next junction and estimate gradient. Two questions:
-
The offline maps live on shared storage at /storage/self/primary/offline/maps/*.map in standard Mapsforge format, readable with the normal storage permission. Is an extension permitted to read those files? Is that location something you'd consider stable across firmware updates, or should I treat it as private and not rely on it?
-
Is there a supported or planned karoo-ext API for the roads or elevation near the rider without navigation running, similar to what NavigatingRoute provides once a route is loaded? Even an elevation-along-heading lookup would cover my case.
If reading the map store is not something you want extensions doing, I'd rather know now and build my own road and elevation data instead. Thanks.
-
I think the Mapsforge data does not contain elevation if I remember correctly, as it's not required to draw the map (The recently added contour lines are precalculated polylines stored elsewhere I think). It does contain other useful data like surface types though.
It would be amazing if HH added access to the predicted route and its elevation to extensions as you suggest. Or even better, low level access to the routine engine and its data. They have not added new features to the SDK for more than a year or so though, and seem to be happy with what is there currently. They generally do not engage with third party developers here or on the defunct github issue tracker.
Please sign in to leave a comment.
Comments
1 comment