Open nono303 opened 8 months ago
Woah you've done a ton of work! Love your superoverlay project! I'm so glad that someone is interested in this project, I still use it when I go for a walk, but I thought I was the only one confortable with this way of finding new trails, so I never got around to fixing bugs or adding features. Thanks for the hints! Let me share my thoughts line by line:
And about your in-progrss works:
Let's keep in touch, I'll go back on this as soon as I can!
I think I'm done digging on my PHP wikiloc-earth-layer (more than enough for my personal use β°οΈ)
Here are my PHP sources for inspiration (understandable procedures but not directly functional because requires functions from my internal framework) π php_wikiloc-earth-layer.zip
/WikilocScraper.php
: the main class/wikiloc.php
: The Endpoint Handler/wikiloc/*.php
: les endpoints
I've looked for different methods for automatic Wikiloc authentication on the server side, but none of them came up because they were unsuccessful or too complex / time-consuming. The copy-paste of the cookies suits me perfectly I just implemented the update of it on set-cookie value response which allows you to keep the session for 1 week a priori
Anyway - kml remains purely static β© Here is the preliminary workflow implemented:
/
: static kml with an html link: passive & un-checkable _(see wikiloc_root.kml
)_/form
: a splendid HTML form in frenglish ^^
/stub
=> /init
=> /update
et /legend
(png overlay)β The last point I'd like to solve but don't know is to be able to "merge / update" wikiloc_stub.kml
(from /stub
) onto wikiloc_root.kml
(from /
) for not having 2 Wikiloc entries in GoogleEarth.
But I'm not very good at <updates>
on <NetworkLinkControl>
and I don't think it's possible on a <Folder>
without <NetworkLink>
If you ever have any ideas, I'm all ears!
Well now... All that remains is to prepare the 2024 climbing season π
Yes Google KML reference is quite criptic about the use of "
Hi @jonamat, Many many Thx for this project! π€©
I tested and used it few days with success but when I wanted to make some modifications - since I have never developed in Go - I rewrote it in a dirty PHP script with a class scrapper.
It completes my list of topo & overlay (see https://github.com/nono303/kmlsuperoverlay) for Google Earth.
Therefore, Iβll not be able to directly make a PR but here are some modifications / improvements and ideas that I have or will apply
Here is the result of an update example, to illustrate these changes
What i've done
wikiloc-earth-layer.kml
stub on/
request rather than redirecting to your website)nbpage
parameter (1: 24, 2: 48...)Document
track into aFolder
with activity type icon in left menu a. Compact display in the left menu ofFolder
Placemark-Point
&Placemark-LineString
elements with<Snippet>
:warning:
maxline=0
attribute must be present forNetworkLink
, although this is not necessary in static kmla. Changing displayed name by the technical criteria (elevation β difficulty β elevation + β distance) ... Wikiloc name are often dirty ^^
b. Description rewrite Compacted in a single html table
c. Color of the layout style depending on the difficulty (compliant with SAC notation based on the principle that 'skill' corresponds to T1 to T5 ratings) β¦ but Wikiloc skill are often dirty too!
What's in progress
login.do
endpoint is protected by a captcha.I have not (yet) found a way to do it automatically (the https://github.com/ivecanski/scrape_my_wikiloc_stats require solving the captcha via selenium...)
a. Therefore, I use the wikiloc
SESSION
cookie retrieved from my authenticated browser to use the filters.Its lifespan being short, I will dig into the point to try to find automation (note that builtin Google Earth browser doesn't allow script to resolve captcha: it's impossible to login on wikiloc and share cookie :() b. In the meantime, I plan to create a small html page where I define my criteria and this dynamically generates a
wikiloc-earth-layer.kml
stub with the parameters passed to/init
which are then used by/update
.<cookie>
transmitting the list of ids in GET: we can quickly reach the limit of 2048 characters. To bypass this:a. Passing the cookie in POST but I didn't find anything https://developers.google.com/kml/documentation/kmlreference?csw=1&hl=fr#cookie
b. Passing a session identifier (server) into a kml cookie and saving the ids displayed on the server side corresponding to the kml cookie session
So, I would be glad to keep this topic open and share with you what can be improved or added on this wonderful tool - independently of the backend language :)