https://github.com/rofrol/elm-mapbox-symbols-draggable-example
https://github.com/rofrol/elm-mapbox-symbols-draggable-example
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rofrol/elm-mapbox-symbols-draggable-example
- Owner: rofrol
- Created: 2019-02-12T03:32:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-26T18:48:19.000Z (over 7 years ago)
- Last Synced: 2025-02-19T07:36:58.850Z (over 1 year ago)
- Language: Elm
- Size: 4.15 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# elm-mapbox-symbols-draggable-example
## Build a map-based web application
#### Outline
A food delivery company is planning a marketing campaign. The campaign site shows the restaurants of the user's hometown on a interactive map.
#### Specification
Create a web application that shows a map of your hometown with a marker for every restaurant. Markers have two states, locked and unlocked. Users can lock or unlock a marker, a marker can be dragged around the map when unlocked.
#### Requirements
* The map must be zoom- and draggable
* The application must work in IE > 9, Firefox and Chrome
* The application must run on the client-side
* We expect you to write code you would consider production-ready
## Run
Install node and elm and also some http server like `npm i -g serve`.
```bash
$ npm i
$ cp .env.example .env
# set your env variables in .env
$ bash prepare.sh
$ elm make src/Main.elm --output elm.js
$ serve
```
Open http://localhost:5000/.
## Inspiration
Based on:
- https://github.com/gampleman/elm-mapbox/blob/master/examples/Example01.elm
- https://docs.mapbox.com/mapbox-gl-js/example/drag-a-point/
## Result
