Templater icon indicating copy to clipboard operation
Templater copied to clipboard

Expand metadata in space - Geolocation coords support request

Open Tylannn opened this issue 2 months ago • 3 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

No.

Describe the solution you'd like A clear and concise description of what you want to happen.

Like any other tp usage, convert <% tp.coord.current("format") %> to coords in ISO 6709 format.

For example: <% tp.coord.current("±DD.DDDD±DDD.DDDD") %> will be +12.345-098.765.

Geolocation_API should be useful, and this is a minimal practise from W3C school:

<script>
const x = document.getElementById("demo");

function getLocation() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition);
  } else {
    x.innerHTML = "Geolocation is not supported by this browser.";
  }
}

function showPosition(position) {
  x.innerHTML = "Latitude: " + position.coords.latitude +
  "<br>Longitude: " + position.coords.longitude;
}
</script>

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Not yet.

Additional context Add any other context or screenshots about the feature request here.

This feature might be very useful, when people getting old and reading their notes or dairy, a geolocation coords will bring kind of memory. OpenStreetMap's API could convert coords to specific name.

Tylannn avatar May 07 '24 01:05 Tylannn