Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thescientist13/crosswalks-map-poc

A POC using GeoJSON to show a map with crosswalk data
https://github.com/thescientist13/crosswalks-map-poc

Last synced: about 1 month ago
JSON representation

A POC using GeoJSON to show a map with crosswalk data

Awesome Lists containing this project

README

        

# crosswalks-map-poc

## Overview
A POC using [GeoJSON](http://geojson.org/) to show a map with crosswalk data using [Leaflet](http://leafletjs.com/) and [Mapbox](https://www.mapbox.com/).

Currently the app can:
- Get the current user's location (lat / long coordinates) using the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation)
- Using that information to load a contextualized map on the page

## Installation
After you clone the repo, follow these steps

1. Make a Mapbox account and copy your default API key
1. Install [NodeJS](https://nodejs.org/)
1. Install [Yarn](https://yarnpkg.com) by running `npm install -g yarn` // may need sudo
1. Install dependencies by running `yarn install`
1. Setup project by running `yarn run setup`
1. Paste your Mapbox API key into _src/config.json_

All done!

## Running the App
Just to get the app up and running, run `yarn run serve`

### Tasks
- `yarn run develop` - task for local development, with file watching and live reload using [webpack-dev-server]()
- `yarn run build` - production build task
- `yarn run serve` - run a production build locally
- `yarn run setup` - creates _config.json_ from the template file _config.json.tmpl_

**Note: Add `?forceRefresh` to the URL bar to force a geelocation lookup**