Weird interpretation of <url> within gpx file

Started by bongo, November 30, 2011, 08:24:59

0 Members and 1 Guest are viewing this topic.

bongo

i need to open a html page from within a waypoint description. this can e.g. be done by defining an url in the waypoint description within the gpx file.
unfortunately, locus shows a weird behaviour in using the url definition. here's what i found:

if there's no url defined:
locus itself generates an url for it's hotlink: http://<address of geocaching page>/wp=<waypointname>
trying to open the online cache description

if there is an url definition starting with "http://":
locus uses the defined url.

if there is an url definition starting with anything but "http://":
locus does nothing when clicking on the hotlink.

my problem is, that i do not want to open an online url. i need to open a local html file, i.e. my url does not start with "http://" but with "file://", so locus seems to ignore this url  :evil:

there is also a way to use links within a cache description, as it can be found within groundspeak pocked queries. these links are ignored by locus.

so how can i generat a link to a local file from within locus  :?:  :?:  :?:  :?:  :?:  :?:
  •  

Menion

#1
Hi Bongo,
  I need some more information ...

1. if listing contain <a href="file:// ...">X</a> tag, it should work. Tapping on this link should open local file
2. if you place html description under folder locus/data/geocaching/cacheCode.html (should be also in subdirectory under geocaching directory), locus will show new "spiler" tab in main geocaching screen
3. nice description from you, but I need some file for testing. So try points I menitoned above, and if this will not work, send me some sample data to test
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

bongo

#2
hi menion
thanx for the help. i checked this out:

1. depending on where i put the <a href="file:// ...">X</a>, the gpx crashed on import or there was no hotlink in the listing shown.
    where can i find an example gpx file with such references?

2. magic! putting the html files in the right position really works. but unfortunately, pictures within the html files do not show up. i have not yet found out why. i need to further study this. i think relative pathes to images should work, right?

thanx!
  •  

Menion

#3
1. do you have this link in CDATA tag? like this .. <![CDATA[<a href="file:// ...">X</a>]]>
2. yes, there have to be relative or correct absolute paths, this should work
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

bongo

#4
don't know if i should split up my questions into multiple posts...
or i try here with multiple posts:

1)
i can't get the thing with the references working.
so i put a gpx snippet from my gpx for a single geocache below.
can you please insert a link there which is able to open "file://sdcard/Locus/data/geocaches/2T/GC2T8W6.htm"?
so i can see how and where to put it.
thanx a lot for your help!



 <wpt lat="46.9206" lon="7.4138">
  <time>2011-04-19T08:00:00Z</time>
  <name>GC2T8W6</name>
  <desc>Schloss Köniz by scma (1.5/1)</desc>
  <url>http://www.geocaching.com/seek/cache_details.aspx?guid=18c481f1-d6d7-43c5-bfef-09827d94106d</url>
  <urlname>Schloss Köniz by scma</urlname>
  <sym>Geocache</sym>
  <type>Geocache|Multi-cache</type>
    <gsak:wptExtension xmlns:gsak="http://www.gsak.net/xmlv1/5">
      <gsak:UserFlag>true</gsak:UserFlag>
      <gsak:Lock>false</gsak:Lock>
      <gsak:DNF>false</gsak:DNF>
      <gsak:Watch>false</gsak:Watch>
      <gsak:UserData></gsak:UserData>
      <gsak:FirstToFind>false</gsak:FirstToFind>
      <gsak:User2>E</gsak:User2>
      <gsak:User3></gsak:User3>
      <gsak:User4>     </gsak:User4>
      <gsak:County>Bern</gsak:County>
      <gsak:UserSort>0</gsak:UserSort>
      <gsak:SmartName>SchlossKni</gsak:SmartName>
      <gsak:LastGpxDate>2011-09-29</gsak:LastGpxDate>
      <gsak:Code>GC2T8W6</gsak:Code>
      <gsak:Resolution></gsak:Resolution>
    </gsak:wptExtension>
  <groundspeak:cache id="2189228" available="True" archived="False" xmlns:groundspeak="http://www.groundspeak.com/cache/1/0/1">
   <groundspeak:name>Schloss Köniz</groundspeak:name>
   <groundspeak:placed_by>scma</groundspeak:placed_by>
   <groundspeak:owner id="2445023">scma</groundspeak:owner>
   <groundspeak:type>Multi-cache</groundspeak:type>
   <groundspeak:container>Small</groundspeak:container>
   <groundspeak:attributes>
     <groundspeak:attribute id="1" inc="1">Dogs allowed</groundspeak:attribute>
     <groundspeak:attribute id="6" inc="1">Recommended for kids</groundspeak:attribute>
     <groundspeak:attribute id="7" inc="1">Takes less than an hour</groundspeak:attribute>
     <groundspeak:attribute id="13" inc="1">Available at all times</groundspeak:attribute>
     <groundspeak:attribute id="25" inc="1">Parking available</groundspeak:attribute>
     <groundspeak:attribute id="26" inc="1">Public transportation</groundspeak:attribute>
     <groundspeak:attribute id="32" inc="1">Bicycles</groundspeak:attribute>
     <groundspeak:attribute id="59" inc="1">Food Nearby</groundspeak:attribute>
   </groundspeak:attributes>
   <groundspeak:difficulty>1.5</groundspeak:difficulty>
   <groundspeak:terrain>1</groundspeak:terrain>
   <groundspeak:country>Switzerland</groundspeak:country>
   <groundspeak:state>Espace Mittelland (BE/SO)</groundspeak:state>
   <groundspeak:short_description html="False">Kleiner Rundgang auf dem Areal des Schloss Köniz</groundspeak:short_description>
   <groundspeak:long_description html="False">Geschichte
Das Könizer Schloss ist ein in mehreren Etappen aus dem Stiftsgebäude der Augustinerchorherren hervorgegangener Komplex mit imposantem Hauptgebäude und weitläufigem Wirtschaftshof. Das ummauerte Stiftsgebäude wurde gegen Ende des 11. Jahrhunderts erbaut, Anbau des Ritterhauses auf der Südseite und Anlage des Hofs um 1261. Im 14./15. Jahrhundert Verbauung des Freiraums zwischen Ringmauer und Westfront, im Wirtschaftshof Neubau der Ökonomiegebäude. 1610 Umbau des Hauptgebäudes in nachgotischen Formen, weitgehender Neubau des Westtrakts nach 1664.
Im 18. Jahrhundert Erneuerung der Gesamtanlage mit Neubauten im Wirtschaftshof und Umbauten im Hauptgebäude. Seit 1825 dient dessen Westtrakt als Pfarrhaus. Das Ritterhaus selbst ist ein mächtiger Rechteckbau unter hohem Walmdach in der Nachfolge zähringischer Donjons. Der stimmungsvoll inszenierte Wirtschaftshof mit dem Hofbrunnen und der imposanten Linde wird dominiert vom grossen, 1724 erbauten Kornhaus, das unter anderem als Standesamt dient. Auf der Westseite des Hofs wurde im 15./16. Jahrhundert das Haberhaus an die Ringmauer angebaut. Heute beherbergt es das Restaurant zum Schloss, die Musikschule Köniz und das Schulmuseum. Die Scheune aus der 2. Hälfte des 19. Jahrhunderts bildet den Ost-Abschluss des malerischen Hofs.
(nach: Kunstführer durch die Schweiz – Band 3)


Nun zum Rundgang (es müssen keine Privatgelände betreten werden)

Station 1 – Übersicht: N 46º 55.236     E 7º 24.828
Hier kannst du dir eine Grundlage verschaffen.
a = Ritterhuus - Pfarrhus
b = Rossstall - Wöschuus
c = Kirche

Station 2 – Musik: N 46° 55. a / b-a-c / c      E 7° 24. b / a+c / b-c
Über der Tür steht die Hausnummer, was steht aber für ein Zahl e (in blau) unter der Tür?
Gegen Norden siehst du einen erfrischenden Brunnen mit einer Jahreszahl f

Station 3 – typisch Köniz: N 46° 55.a / letzte Ziffer e / c    E 7° 24. 2. Ziffer e / b-a-3. Ziffer f / b
Du stehst auf einem für Köniz charakteristischen Objekt.
g = gegen Westen läuft ein Plattenweg, zähle alle Steinplatten im Gras bis zur Schwelle des Gebäudes (Quersumme = a+b+c)
h = über dem Portal südlich von dir steht eine Jahreszahl

Station 4 – waschen: N 46° 55.a / 3. Ziffer h / 3. Ziffer h - 2. Ziffer h      E 7° 24. 2. Ziffer g+c / 1. Ziffer g / 1. Ziffer f + 2. Ziffer f
Auf diesem Platz toben sich häufig Kinder und Jugendliche aus, von hier aus steigt man aber auch in den Ritterkeller ab.
j = Anzahl Wasserspender unter dem Dach
k = Am Dach des offenen Wöschüüsli siehst du 3 Samurai (k =2); 3 Schwinger (k = 3) oder 3 Fallschirmspringer (k = 4)
Gleich nebenan ist der Eingang zum Ritterchäller. Wie viele Nischen (m) hat es dort rechts der Türe im Sandstein?

Station 5 – Rückseite: N 46° 55.k / k+j / 2*m      E 7° 24.3. Ziffer h / a+2. Ziffer g / k+j
Nun ein Blick hinter die Kulissen. Wie viele Steine (n) schützen jeden Baum links und rechts gegen Verkehrsunfälle?

Station 6 – Final: N 46° 55.n+k-j / n+m-j / n-c      E 7° 24.2*n+k / 3*n / j*n

24.04.11: Listing bei Station 2 korrigiert

Additional Waypoints
PK2T8W6 - GC2T8W6 Parking
N 46° 55.195 E 007° 24.900</groundspeak:long_description>
    <groundspeak:encoded_hints>verboten</groundspeak:encoded_hints>
   <groundspeak:logs>
    <groundspeak:log id="-2">
    <groundspeak:date>2011-09-30T08:00:00</groundspeak:date>
    <groundspeak:type>Other</groundspeak:type>
    <groundspeak:finder id="0">GSAK</groundspeak:finder>
    <groundspeak:text encoded="False">*Spoiler Pictures*
 GC2T8W6 - Schlosshof.jpg
&lt;img src='file://D:geocachinggsakspoilersGC2T8W6 - Schlosshof.jpg'&gt;&lt;br&gt;&lt;br&gt;
GC2T8W6 - Sommerstimmung.jpg
&lt;img src='file://D:geocachinggsakspoilersGC2T8W6 - Sommerstimmung.jpg'&gt;&lt;br&gt;&lt;br&gt;
GC2T8W6 - Übersicht.jpg
&lt;img src='file://D:geocachinggsakspoilersGC2T8W6 - Übersicht.jpg'&gt;&lt;br&gt;&lt;br&gt;
*End Spoilers*
    </groundspeak:text>
   </groundspeak:log>
    <groundspeak:log id="188103980">
      <groundspeak:date>2011-09-23T19:00:00Z</groundspeak:date>
      <groundspeak:type>Found it</groundspeak:type>
      <groundspeak:finder id="3881767">sbeelis</groundspeak:finder>
      <groundspeak:text encoded="False">Den Anfang zu diesem Cache machten wir am Kibuk-Kindermedien-Festival. Nach den ersten 4 Posten konnte ich aber die Kids damals nicht mehr vom Heissluftballon und dem Bücherminigolf weglocken, so dass wir dort abbrachen. Später kam ich dann nochmals mit der Tochter zurück, da wir aber die Frage mit den Nischen total falsch verstanden und somit nach was falschem Gesucht hatten, landeten wir am falschen Ort und gaben auf. Ein netter Hint vom Owner half uns dann weiter und so konnten wir heute diesen Multi endlich zu Ende bringen. Danke für die tolle Tour auf dem schönen Schlossgelände.</groundspeak:text>
    </groundspeak:log>
    <groundspeak:log id="187311547">
      <groundspeak:date>2011-09-18T19:00:00Z</groundspeak:date>
      <groundspeak:type>Found it</groundspeak:type>
      <groundspeak:finder id="2822853">squirell99</groundspeak:finder>
      <groundspeak:text encoded="False">Wir lieben diese kleinen Multis wo man nicht Stunden laufen muss. Alle Zahlen gut gefunden. Die Suche des Finals dauerte nicht lange und wir konnten loggen. Gruss FLSG</groundspeak:text>
    </groundspeak:log>
    <groundspeak:log id="187232693">
      <groundspeak:date>2011-09-18T19:00:00Z</groundspeak:date>
      <groundspeak:type>Found it</groundspeak:type>
      <groundspeak:finder id="3153497">Rollsky</groundspeak:finder>
      <groundspeak:text encoded="False">Toller Multi an einem wundersch&amp;#246;nen Ort. Herzlichen Dank f&amp;#252;rs Auslegen.</groundspeak:text>
    </groundspeak:log>
    <groundspeak:log id="187228800">
      <groundspeak:date>2011-09-18T13:12:24Z</groundspeak:date>
      <groundspeak:type>Found it</groundspeak:type>
      <groundspeak:finder id="4879037">Caromania1984</groundspeak:finder>
      <groundspeak:text encoded="False">Das war ein interessanter multi. An einem verregneten sonntag konnten wir diesen so gut wie muggelfrei loggen. TFTC</groundspeak:text>
    </groundspeak:log>
    <groundspeak:log id="187021624">
      <groundspeak:date>2011-09-17T19:00:00Z</groundspeak:date>
      <groundspeak:type>Write note</groundspeak:type>
      <groundspeak:finder id="232870">tastom</groundspeak:finder>
      <groundspeak:text encoded="False">Anlässlich des Festes 150 Jahre Wasserversorgung Köniz zufälligerweise beim Cache vorbei gelaufen, der total "entblösst" da lag. Habe Tarnung wieder hergestellt.

This entry was edited by tastom on Saturday, 17 September 2011 at 19:42:52 UTC.</groundspeak:text>
    </groundspeak:log>
  </groundspeak:logs>
   <groundspeak:travelbugs>
   </groundspeak:travelbugs>
</groundspeak:cache>
</wpt>
  •  

bongo

#5
for point
2)

yes, this works, great!
but (there unfortunately is a but  :cry: ):

the html is shown and the pictures are there too, but there's a problem with some characters. the characters 'äöüÄÖÜ°' are all shown as a diamond with a '?'.
is there a problem with the html viewer within locus?
is there a way to correct this?
when opening the html from file manager, everything shows well, but from within locus, i get all these diamonds with a '?'.
  •  

bongo

#6
and an additional point
3)
if a geocache loaded from gpx has child waypoints, opening the cache descriptions indicates that there are multiple waypoints. but i neither get the coords of the child waypoints shown nor have i found a way to show these waypoints on the map.
how can this be done?
  •  

stebu

#7
Quote from: "bongo"and an additional point
3)
if a geocache loaded from gpx has child waypoints, opening the cache descriptions indicates that there are multiple waypoints. but i neither get the coords of the child waypoints shown nor have i found a way to show these waypoints on the map.
how can this be done?
When the pop up for a cache tells you "Waypoints    n" (n>0)
Click on the "Cache box" (leftmost button)
In the new window click on the 2nd from left button (two points connected by two arrows).
That's it.
  •  

Menion

#8
thanks stebu ;)

bongo ...
1) support for external files directly in URL tag in GPX file was not supported ... till now
2) about problem with diacritics ... it have to be some issue with encoding of file. Is file displayed correctly in web browser? If so, send me it

new version will be released probably tomorrow. I have there some news that want to publish soon, so test it please then and let me know ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

bongo

#9
hi menion

1)
gpx 1.0 seems to use the url tag, while gpx 1.1 seems to do it using href. i added a snippet from gpx 1.0, but could also be done with 1.1.
i could send you both files so that you can tell me where to put the link to the external file.

2)
to what address can i send the file? in the browser, the file looks ok, but within locus i got all these chars replaced with the 'diamond?'.
  •  

bongo

#10
i've sent the files to your email!
  •  

Menion

#11
fine thanks, email received

I'm playing with this ... in locus is using (forcing) utf-8 encoding for external files. I was trying to leave this settings off and just load file, but without correctly set encoding in file, this don't work. So to do not broke already working solution, I'll leave system as is. This mean you have to have files encoded in utf-8. Example how I achieved this. Download notepad++ program. Install, open html file and from top menu select encoding > convert to UTF-8. That's all, now it should work correctly

with links in file ... there was simple problem as I discovered. They were loaded by locus, but never displayed. So fixed now ..
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

bongo

#12
ok, so i checked the link again with the lates version of locus:

line in the GPX file:
<url>file://sdcard/Locus/data/geocaching/2D/GC2DBB0.htm</url>

locus tries to open:
content://com.android.htmlfileprovider/ ... ?text/html

with no success.

although there is a file:
sdcard/Locus/data/geocaching/2D/GC2DBB0.htm

on the flash.

so what am i still doing wrong?
  •  

Menion

#13
ach ... sentence "fixed now" do not mean that old version on market have this fixed .. you have to wait till next release
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

bongo

#14
yes, filename on andridpit is ...1.21...

isn't this the right place to find the latest version?
  •