asamm/locus-api

Import waypoint + start navigation/guidance

ztNFny opened this issue · 3 comments

Hi,
I'm currently looking into some Wear OS development and want to send a geocache to Locus (ActionDisplayPoints.sendPacksFile) and then start guidance / navigation (ActionTools.actionStartNavigation) to that point right away. Of course I could send these two intents right after another, but then Locus navigates to a point at these coordinates, not to the geocache as it does when manually selecting the point created by ActionDisplayPoints
Would be great for sendPacksFile to accept an additional extra "action" with values for navigate/guide.

Hello,
I'm checking various options and what you want really is not currently possible.
Currently actionStartNavigation starts "Navigate to" screen where define point (over API) is set as "target point". Anyway in navigation, only name and coordinates are used as definition of target point, all other parameters are discarded no matter if you start navigation manually or from any point directly in Locus Map.

So may question: What you expect from this feature and how it helps your use-case compare to call actionStartNavigation(Activity act, String name, double latitude, double longitude)?

Starting navigation to a geocache interactively shows the geocache details at the top of the Locus window. actionStartNavigation() does the same as selecting a point in Locus and then navigating to it, it shows the points data.
So I guess what I actually want is really a "startNavigation/GuidanceToGeocache" function.

See these screenshots for the difference:
screenshot_20190103-120822
screenshot_20190103-121139

Hello,
I was thinking about it and additional parameters together with PackWaypoints are little problematic.

For this use-case (and I believe it will be useful in other cases as well), I've just created two additional methods.

First allows to search for nearest visible points in the defined area and second allows to start navigation/guiding on existing points defined by ID.

Sample function that may help you is here: https://github.com/asamm/locus-api/blob/master/locus-api-android-sample/src/main/java/com/asamm/locus/api/sample/utils/SampleCalls.kt#L459 , hope it will be clear how it works.

You will have to wait with testing because it needs new Locus Map version 3.36.0, that will be published during next week.