Can I somehow download activity area from HDYC?

You’ll have to sweat a bit in the browser console. Using Firefox as an example:

1-2 On the Debugger tab in the search bar write var th = getCenter(activityPoints)
3. Set a breakpoint
4. Check that ignoring breakpoints is disabled and reload the tab
5. Open the console by pressing (possibly twice) Esc. Or open the Console tab. Paste the following code

copy(JSON.stringify({
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          activityPoints.map(i => [i.lng, i.lat])
        ]
      }
    }
 ]
}))
  1. Click Run
  2. Done

Open geojson.io and paste the result from the clipboard into the text field.


For the result for the last week, find the line var t = getCenter(activityPointsLatest);

Do the same but change the variable name in the script from activityPoints to activityPointsLatest and instead of reloading the tab, click Show latest activity area on the map

copy(JSON.stringify({
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          activityPointsLatest.map(i => [i.lng, i.lat])
        ]
      }
    }
 ]
}))

p.s. It looks like syntax highlighting is not configured on the forum Configure which programming languages are available for syntax highlighting - Site Management - Discourse Meta

3 Likes