Web app for quickly creating and editing Pinpoint maps
Note: As of 2021, this tool has been deprecated and the repository is no longer being maintained.
Pinpoint Editor is a web app for quickly creating and editing Pinpoint maps.
Features:
Pinpoint Editor requires:
Here's how to install it locally:
Note: If you have trouble setting up Pinpoint Editor, please open a ticket on GitHub.
Install required software
If on OS X, you can install all software using these commands:
# Install Brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install NodeJS.
brew install node
# Install PostgreSQL.
brew install postgresql
# Install Bower.
npm install bower
Set up database
Create a PostgresSQL database. You can name it anything you like.
createdb pinpointDb
Set DATABASE_URL
environment variable.
export DATABASE_URL='postgresql://localhost/pinpointDb'
Run migration script to set up table and load examples.
psql $DATABASE_URL < build/migrate.sql
You may need to start the database server manually:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
Install dependencies
# Install server-side dependencies
npm install
# Install client-side dependencies
bower install
Configure settings
Generate a new Google Maps API key by following these instructions and add it to config.json
(under the googleMapsAPIKey
property).
Optional: To enable AWS S3 export, set these environment variables:
export AWS_S3_KEY='XXXXXXXXXXXXXX'
export AWS_S3_SECRET='XXXXXXXXXXXXXX'
export AWS_BUCKET='XXXXXXXXXXXXXX'
Run the server!
node server.js
You will then be able to access Pinpoint at http://localhost:3001.
If you have Docker installed you can run the Pinpoint editor by simply typing docker-compose up
. You can
then access Pinpoint at http://localhost:3001.
On the server, Pinpoint uses the minimal Express framework for routing. Data is stored as JSON using PostgresSQL's native JSON data type, which can then be accessed via a simple API (see below for details). Data can then be exported to S3-hosted static JSON for production use.
On the client, Pinpoint is an Angular app made up of multiple custom directives. Key files are script.js
and directives/map-detail.html
. Dependencies are managed using Bower.
GET - /api/maps
GET - /api/maps/:id
POST - /api/maps/
Content-Type: application/json
HTTP/1.1 201 Created - {"id": id, "message": "Map created"}
PUT - /api/maps/:id
Content-Type: application/json
HTTP/1.1 200 OK - {"message": "Map updated"}
Various settings are controlled via config.json
. See config-example.json
for dummy values.
Editor interface options
Map setting options
These are used in all Pinpoint instances in the editor.
v1.2.1 (27 March, 2017)
v1.2.0 (17 February, 2017)
v1.1.0 (17 July, 2015)
v1.0.1
v1.0.0