Skip to content

Commit

Permalink
fix(package.json): change main link and update readme
Browse files Browse the repository at this point in the history
updat link in package.json to point to dist/mappa.js, erase the todo.md, and added tl;dr

closes #3
  • Loading branch information
cvalenzuela committed Aug 5, 2017
1 parent 75947c9 commit 728ce76
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 30 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@ Not sure what map provider to use? Check out this [~~guide to picking a map libr

If you are new to maps, check out [~~this complete tutorial~~]() and [~~this glossary of terms~~]().

### tl;dr
```javascript

// Your Mapboxgl API Key
var key = 'abcd'

// Create a new Mappa instance using Mapboxgl.
var mappa = new Mappa('Mapboxgl', key);
var myMap;
var canvas;

function setup(){
canvas = createCanvas(640,640);
myMap = mappa.tileMap(0,0,4); // lat 0, lng 0, zoom 4
myMap.overlay(canvas)
}

function draw(){
...
}

```

### Demos
All of the following examples are visualizing the 5000 largest Meteorite Landings. Data from [NASA's Open Data Portal.](https://data.nasa.gov/Space-Science/Meteorite-Landings/gh4g-9sfh)
+ Static Maps
Expand Down
2 changes: 1 addition & 1 deletion examples/tile/Mapboxgl/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Data from NASA's Open Data Portal.(https://data.nasa.gov/Space-Science/Meteorite

// API Key for Mapboxgl. Get one here:
// https://www.mapbox.com/studio/account/tokens/
var key = 'pk.eyJ1IjoibWFwcGF1c2VyIiwiYSI6ImNqNXNrbXIyZDE2a2cyd3J4Ym53YWxieXgifQ.JENDJqKE1SLISxL3Q_T22w'
var key = 'pk.eyJ1IjoibWFwcGF1c2VyIiwiYSI6ImNqNXNrbXIyZDE2a2cyd3J4Ym53YWxieXgifQ.JENDJqKE1SLISxL3Q_T22w';

// Options for map
var options = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mappa-mundi",
"version": "0.0.1",
"description": "An addon to facilitate work between p5 and existing map libraries and APIs.",
"main": "dist/index.js",
"main": "dist/mappa.js",
"directories": {
"example": "examples",
"lib": "lib",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Mappa: A library to work with maps and p5.js
* https://github.com/cvalenzuela/p5.maps
* https://github.com/cvalenzuela/mappa
*
* Cristóbal Valenzuela
* cv965@nyu.edu
Expand Down
26 changes: 0 additions & 26 deletions todo.md

This file was deleted.

2 changes: 1 addition & 1 deletion tutorials/taxiroutes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can see the final result [here](https://cvalenzuela.github.io/Mappa/tutorial
- In a new folder create an `index.html` and `script.js` files.
- Download [`p5.js`](https://github.com/processing/p5.js/releases/download/0.5.11/p5.js) and [`Mappa.js`](https://raw.githubusercontent.com/cvalenzuela/Mappa/master/dist/mappa.js) and save them in a folder call `libraries`
- Download the [data for one taxi for one day](https://raw.githubusercontent.com/cvalenzuela/Mappa/master/tutorials/taxiroutes/data/taxiday1.geojson) and save it in a folder called `data`.
- In order to run this tutorial you will need a local server. There are many different ways to create a [local server](https://github.com/shiffman/The-Nature-of-Code-JTerm-2015/wiki/Local-Server-Tutorial). Here are some:
- In order to run this tutorial you will need a local server. There are many different ways to create a [local server](https://github.com/processing/p5.js/wiki/Local-server). Here are some:

If you use node and npm you can install `live-server`:
```zsh
Expand Down

0 comments on commit 728ce76

Please sign in to comment.