https://github.com/billstclair/elm-geolocation
Get location data from Elm
https://github.com/billstclair/elm-geolocation
Last synced: 11 months ago
JSON representation
Get location data from Elm
- Host: GitHub
- URL: https://github.com/billstclair/elm-geolocation
- Owner: billstclair
- License: bsd-3-clause
- Created: 2018-09-23T02:17:11.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T00:12:45.000Z (about 7 years ago)
- Last Synced: 2025-07-06T07:15:21.763Z (11 months ago)
- Language: Elm
- Size: 46.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Geolocation in Elm
Your client code is running on someone's device somewhere in the world. This library helps you find out *where* that device happens to be. If you are lucky, it may even tell you how fast the device is moving!
It is based on the [JavaScript Geolocation API][geo]. You can read about how to use libraries with tasks and subscriptions in [guide.elm-lang.org](http://guide.elm-lang.org/), particularly the section on [The Elm Architecture](http://guide.elm-lang.org/architecture/index.html).
[geo]: https://developer.mozilla.org/en-US/docs/Web/API/Geolocation
This is a conversion of the Elm 0.18 [elm-lang/geolocation](https://package.elm-lang.org/packages/elm-lang/geolocation/latest) package. That package used native code and an `effect module`, which user code is not allowed to do, so I converted it to use ports, shared with other clients of [billstclair/elm-port-funnel](https://package.elm-lang.org/packages/billstclair/elm-port-funnel/latest).
See the README in the [example](https://github.com/billstclair/elm-geolocation/tree/master/example) directory for instructions on running the example.
The example is live at [billstclair.github.io/elm-geolocation](https://billstclair.github.io/elm-geolocation/).
Bill St. Clair, 22 September 2018