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?
问题:
回答1:
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
回答2:
I work at HyperTrack, and we have a few FREE solutions you could use.
HyperTrack Live, an Android (https://play.google.com/store/apps/details?id=io.hypertrack.sendeta&hl=en) and iOS (https://itunes.apple.com/us/app/hypertrack-live/id1076924821?mt=8) app which allows you to share your location and destination which your friends can follow right along with via a private link you share with them.
HyperTrack API/SDK, which allows you to create an application (or use one of the example apps we've open sourced at http://github.com/hypertrack) that contains our FREE SDK and then it will just follow you where you go and you can use a widget to embed into your website. Our SDK is very battery efficient and uses less than 10% while actively tracking all day.
回答3:
Yes it is possible,you can extract the location values of a device that travels all the way. At first the latitude and longitude values of a device location has to be tracked it can done in android by listening to OnLocationUpdate() method,that provides the location values for a certain interval. Then you have to handle the location and send it to the receiver device then plot the updated location in Maps..
On the other hand the execution of sharing your location with anyone can be done by integrating a reliable SDK TELIVER
TELIVER SDK provides you a realtime location sharing feature. The SDK can be easily integrated in Android or IOS Application the users can be registered as CONSUMER or OPERATOR. The user who is registered as a CONSUMER can share his location with a trackingID to anyone. And who all having the trackingId can track the user location in maps.
Live Tracking Made Easier