Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages v4 API #457

Merged
merged 1 commit into from
Jun 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/key.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mapboxgl.accessToken = 'pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiNmJYeV92dyJ9.vfhXLy3DvaA9TK6nctd6Qw';
16 changes: 0 additions & 16 deletions common/sources.js

This file was deleted.

4 changes: 1 addition & 3 deletions osm-bright/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<script src='https://mapbox.s3.amazonaws.com/mapbox-gl-js/master/mapbox-gl.js'></script>
<script src='../common/domready.js'></script>
<script src='../common/sources.js'></script>
<script src='../common/key.js'></script>
<script>
mapboxgl.util.getJSON('osm-bright.json', function(err, style) {
if (err) throw err;
Expand All @@ -42,12 +42,10 @@
];
var map = new mapboxgl.Map({
container: 'map',
sources: window.sources,
style: style,
maxZoom: 20,
zoom: 19,
center: places[tick],
rotation: 0,
hash: true
});

Expand Down
8 changes: 8 additions & 0 deletions osm-bright/osm-bright.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"version": "1",
"sources": {
"mapbox.mapbox-streets-v5": {
"type": "vector",
"url": "mapbox://mapbox.mapbox-streets-v5",
"glyphs": "http://mapbox.s3.amazonaws.com/gl-glyphs-256/{fontstack}/{range}.pbf",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are glyph PBFs part of a source?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary until we find a better place for it.

"tileSize": 512
}
},
"buckets": {
"waterway_other": {
"filter": {"source": "mapbox.mapbox-streets-v5", "layer": "waterway", "type": ["ditch", "drain"]},
Expand Down
4 changes: 1 addition & 3 deletions outdoors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@
<div id='map'></div>
<script src='https://mapbox.s3.amazonaws.com/mapbox-gl-js/master/mapbox-gl.js'></script>
<script src='../common/domready.js'></script>
<script src='../common/sources.js'></script>
<script src='../common/key.js'></script>
<script>
mapboxgl.util.getJSON('outdoors.json', function(err, style) {
if (err) throw err;
var map = new mapboxgl.Map({
container: 'map',
sources: window.sources,
style: style,
maxZoom: 20,
zoom: 15,
center: [37.76, -122.45],
rotation: 0,
hash: true
});
});
Expand Down
8 changes: 8 additions & 0 deletions outdoors/outdoors.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"version": "1",
"sources": {
"mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v5": {
"type": "vector",
"url": "mapbox://mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v5",
"glyphs": "http://mapbox.s3.amazonaws.com/gl-glyphs-256/{fontstack}/{range}.pbf",
"tileSize": 512
}
},
"buckets": {
"landcover_snow": {
"filter": {"source": "mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v5", "layer": "landcover", "class": "snow"},
Expand Down
4 changes: 1 addition & 3 deletions pencil/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@
<div id='map'></div>
<script src='https://mapbox.s3.amazonaws.com/mapbox-gl-js/master/mapbox-gl.js'></script>
<script src='../common/domready.js'></script>
<script src='../common/sources.js'></script>
<script src='../common/key.js'></script>
<script>
mapboxgl.util.getJSON('pencil.json', function(err, style) {
if (err) throw err;
var map = new mapboxgl.Map({
container: 'map',
sources: window.sources,
style: style,
maxZoom: 20,
zoom: 15,
center: [37.76, -122.45],
rotation: 0,
hash: true
});
});
Expand Down
8 changes: 8 additions & 0 deletions pencil/pencil.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"version": "1",
"sources": {
"mapbox.mapbox-streets-v5": {
"type": "vector",
"url": "mapbox://mapbox.mapbox-streets-v5",
"glyphs": "http://mapbox.s3.amazonaws.com/gl-glyphs-256/{fontstack}/{range}.pbf",
"tileSize": 512
}
},
"buckets": {
"park": {
"filter": {
Expand Down