This object is in archive! 

Custom Cue Waypoints via API

Bob Kowalski shared this question 3 years ago
Answered

I was able to easily send a route and waypoints using the API in an Android application using the API. I was not able to determine how to add Cue info and custom Icon for turn-by-turn cueing to each of the waypoints. Using standard icons for straight, left turn, sharp left, slight left etc. would be fine but I would like my custom cue info to be voiced.

Replies (5)

photo
1

Hello Bob,

may you please more precisely write what exactly you want to achieve, thanks.

Jiří M. aka Menion

photo
1

Sorry - I should have not sent the initial request via my phone as it's terseness was less than useful.

Using the Locus Map API, and the samples that were provided via Github, I have successfully been able to create an Android application to communicate track points (captured in an ArrayList of Locations) and see the track displayed on Locus Map 3.50.1. I have also been able to communicate way points (captured in an ArrayList of Points) and see an icon displayed (very small dot) for each of them. I believe (based on searching this site) that the small dot is used by Locus Map when there is no mapping (value is either zero or null when Point was created) to a recognized icon value.

The way points I created are associated with turn-by-turn cuing information (such as "Sharp left onto Elm Street") providing details beyond just turn right, turn left, etc.

I am looking for assistance with the following:

  1. When viewing the track on Locus Map, I would like to have an icon representing the turn (left turn, sharp left, slight left, u-uturn, etc) be displayed at the coordinates for the Point instead of the small dot. My application uses a set of "free" icons (svg images) in displaying the Cue Sheet info. I am capable of converting these svg images into any format required by Locus Map for display. I would be fine using turn icons already present in Locus Map if you could provide me info on how to annotate the Point to display the icon. (See attached file Cuesheet.png with a Cue Sheet example and MapDots.png for small dot). I was not able to discern from the documentation how to parameterize the Point to display any icon.
  2. When navigating on the route, Locus Map announces the upcoming turn. I am not certain if that is because I was able to correctly annotate the Point or if it is the intelligence of the program. (See attached CueInfo.png for what is displayed). Can you confirm that using Point.SetRteAction() is the correct way to add cause Locus Map to announce upcoming turn information?
  3. I believe that Locus Map can also announce the additional details for the cue. I used Point.SetDescription() which results in the additional text for the way point being displayed at the top of the map (refer to the attached CueInfo.png). Is it possible to get Locus Map to announce these additional details as well as the turn information?

Thanks for your time and responsiveness.

The API works great.

Bob

photo
1

Hello Bob,

thanks for the detailed description. I'm glad to see someone new trying (successfully) to use Locus API, nice!

1. This is currently not possible. Locus Map during drawing detects if the certain waypoint is track navigation waypoint with certain defined navigation command and if so, it is drawn with small dot only. So if you want to display points with a custom icon, that can't be waypoints with a navigation command.

Point with navigation command is defined by set `GeoDataExtra.PAR_RTE_POINT_ACTION` value.

Icon may se set simply by `Point.parameterStyleName` value (url to icon) or by more complex `StyleNormal`.

2. Yes, this parameter is exactly the method needed to correct announce any navigation commands.

3. App should notify also the `GeoDataExtra.PAR_COMMENT` value, so suggest giving a text you want to hear as this parameter to navigation points. It should help.

---

Locus API documentation is not perfect, so please try yourself and ask if something won't work as expected. I'll gladly help or update Locus API docs.

Jiří M. aka Menion

photo
1

Menion,

The excellent Github examples were the secret to my success.

Actually, while my description didn't explain exactly what I was trying to achieve, your response did get me on the right path. By using setParameterRteAction() and setting the action to one of the PointRteAction values I was able to have Locus Map program recognize the point as a turn. The small black dot (for Waypoint) dot (see previous post) turned into a turn cue point (see turn_point.jpg attachment). Now my additional text appears (via setting GeoDataExtra.PAR_COMMENT) when I click on the point.


Using Point.setParameterStyleName() and providing a URL to a PNG worked GREAT!!!


Thanks again for the support and quick response. I'm sure more things will come up but this was great progress.


Bob

photo
1

Hello Bob,

perfect, glad to hear it. Feel free to open a new topic here or directly in the Locus API GitHub repo, if something won't work!

Menion

Replies have been locked on this page!