This object is in archive! 

Importing waypoints with links

Piotr Rajca shared this question 6 years ago
Answered

Hi,


I would like to import waypoint from GPX file, but I would like to include in these waypoints links to other aplication on an Android device - or more precisely: links which would allowe me to open another navigation app and point it to chosen location. For instancje Sygic as a special link format:

  1. <a href="com.sygic.aura://coordinate|17.12812|48.15594|show">Sygic show</a>


I have tried to put such a link inside a <desc> element inside <wpt> element - but that doesn't seem to work.

I hava also tried to put in inside a <link> element inside <wpt> element:

  1. <wpt>...<link href="[sygic_url]"><text>link title</text></link> ... </wpt>

This link nicely shows on the bottom of point's information page, with link title properly shown, but when I tap this link it tries to open a browser, not a Sygic nav app.


So the question is: is it possible to add, in any way, such a links which open another application?


Thanks in advace.

Peter

Replies (1)

photo
1

Good day Piotr,

just for curiosity, I've tried your first method and have to say it works for me correctly!


Anyway if main intent is to start navigation, then most of navigation apps (like sygic) is already available at bottom "navigation" menu directly and if not, it is possible to use again bottom navigation > Navigation apps which calls just basic "geo" intent that should be used by all nav. apps (probably).


Hope this helps.

photo
1

Hi Menion,


LOL... Sure you helped me: find the correct option in the menu... now I feel so ambaraced... Every programmer knows this feeling if he tries to do something "wise" instead of doing somethine simple! :) Certainly thats solves my problem.

But just as a proof of concept, could give me an example of correct format for embedding links in description, since I must do something wrong:


  1. <wpt lon="20.64059" lat="41.12635">
  2. <ele>0.0</ele>
  3. <name>Camping Livadista [9 €|5|2,88]</name>
  4. <desc><a href="http://www.locus.com">test link</a> Cena: 9 €, Ocena: 2,88, Kat.: 5, ...</desc>
  5. <link>http://www.onet.pl/</link></a>;
  6. </wpt>


Best regards

Peter

photo
1

Hello,

perfect.


Suggest to try description with escaped characters or encapsuled to CDATA container like

  1. <desc><![CDATA[<a href="com.sygic.aura://coordinate|14.38|50.10|show">Sygic start </a>]]></desc>


This should work (at least it looks like working for me).

Have a nice day,

Menion

photo
1

Gosh... I've forgotten about this CDATA stuff... Huge thanks Menion, that's all I needed and even more then I wanted. :)

With best regards

Peter

Replies have been locked on this page!