javascriptgoogle-mapslocation

Share my current location with the world publicly?


I'd like to create a website where I share MY current location with the world, I've been reading about this all morning but I can't see a way to embed this into a website so it's publicly view able, Is it possible?


Solution

  • You could have your common URL redirect to your latest coordinates such as: - https://www.google.com/maps/place/-31.8878269,115.8162218/@-31.8878269,115.8162218,17z

    IOW specify the Lon/Lat coords in the URL as parameters.

    If you were to go for a more extensive solution then I suggest server intelligence would be required to keep a database of your (and your friends?) current location. A change could be polled from interested clients or a specific event could be pushed from the server and subscribed to in a client ServiceWorker.

    If you choose this path then you will inevitably be confronted by the conumdrum that Web Apps can't track geolocation unless in the foreground and the phone is not asleep. So if you wanted your ski buddies to see which piste you're on or your cycling/jogging mates to see your progress then W3C/IETF flat-out refuse to acknowledge your very existence let alone your requirements/business case :-(

    Exhibit A

    Exhibit B