Skip to content

Feedback & IdeasΒ #8

Description

@nono303

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.

image

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

  1. ServerURL override; my go server was listening on 127.0.0.1:3000 and running behind an Apache reverseProxy with endpoints for all kml links like https://www.mydns.com/topos/wikiloc/…
  2. Direct use of png icons https://sc.wklcdn.com/wikiloc/images/pictograms/ge/{1..144}.png rather than /cmd/get-icons/get-icons.go which transforms the svg in /web/static/icons/ (might answer Increase SVG conversion precisionΒ #1)
  3. Send the wikiloc-earth-layer.kml stub on / request rather than redirecting to your website)
  4. Select number of pages to load with a nbpage parameter (1: 24, 2: 48...)
  5. Server-side caching of downloaded files (html & json) with TTL
  6. Transformation of the Document track into a Folder with activity type icon in left menu
    a. Compact display in the left menu of Folder Placemark-Point & Placemark-LineString elements with <Snippet>
    ⚠️ maxline=0 attribute must be present for NetworkLink, although this is not necessary in static kml

image
7. For my personal use:
a. 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!

image

What's in progress

  1. Implementation of filters fix shield (again)Β #4. Since the use of filters requires authentication and the Wikiloc 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.
  2. The kml <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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions