Skip to content

Commit

Permalink
Merge pull request #241 from tangrams/nvkelso/v7-remove-default-mapze…
Browse files Browse the repository at this point in the history
…n-api-key

v7 remove default mapzen api key
  • Loading branch information
nvkelso committed Mar 24, 2017
2 parents a6e0c3a + da08f54 commit 6b54da0
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.1
7.0.0
6 changes: 3 additions & 3 deletions bubble-wrap-style-more-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Author: Geraldine Sarmiento, Nathaniel V. Kelso, Patricio Gonzalez Vivo, Brett C
global:
# Sign up for a Mapzen API key to enjoy higher rate limits
# https://mapzen.com/documentation/overview/#developer-accounts-and-api-keys
sdk_mapzen_api_key: mapzen-ZzW4tEy # set this value to your Mapzen API key
sdk_mapzen_api_key: '' # set this value to your Mapzen API key

#ux/ui
ux_language: false # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles
Expand Down Expand Up @@ -1611,7 +1611,7 @@ layers:
filter: { not: { kind: [platform] }, $zoom: { min: 14 } }
draw:
lines:
order: function() { return feature.sort_key || 275; }
order: function() { return feature.sort_rank || 275; }
railway:
filter: { kind: [railway,train] }
draw:
Expand Down Expand Up @@ -3571,7 +3571,7 @@ layers:
lines:
outline:
# except bridges and tunnels, their outlines should also self-sort
order: function() { return feature.sort_key || 305; }
order: function() { return feature.sort_rank || 305; }

buildings:
data: { source: mapzen, layer: buildings }
Expand Down
6 changes: 3 additions & 3 deletions bubble-wrap-style-no-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Author: Geraldine Sarmiento, Nathaniel V. Kelso, Patricio Gonzalez Vivo, Brett C
global:
# Sign up for a Mapzen API key to enjoy higher rate limits
# https://mapzen.com/documentation/overview/#developer-accounts-and-api-keys
sdk_mapzen_api_key: mapzen-ZzW4tEy # set this value to your Mapzen API key
sdk_mapzen_api_key: '' # set this value to your Mapzen API key

#ux/ui
ux_language: false # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles
Expand Down Expand Up @@ -1611,7 +1611,7 @@ layers:
filter: { not: { kind: [platform] }, $zoom: { min: 14 } }
draw:
lines:
order: function() { return feature.sort_key || 275; }
order: function() { return feature.sort_rank || 275; }
railway:
filter: { kind: [railway,train] }
draw:
Expand Down Expand Up @@ -3571,7 +3571,7 @@ layers:
lines:
outline:
# except bridges and tunnels, their outlines should also self-sort
order: function() { return feature.sort_key || 305; }
order: function() { return feature.sort_rank || 305; }

buildings:
data: { source: mapzen, layer: buildings }
Expand Down
6 changes: 3 additions & 3 deletions bubble-wrap-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Author: Geraldine Sarmiento, Nathaniel V. Kelso, Patricio Gonzalez Vivo, Brett C
global:
# Sign up for a Mapzen API key to enjoy higher rate limits
# https://mapzen.com/documentation/overview/#developer-accounts-and-api-keys
sdk_mapzen_api_key: mapzen-ZzW4tEy # set this value to your Mapzen API key
sdk_mapzen_api_key: '' # set this value to your Mapzen API key

#ux/ui
ux_language: false # l10n language code, trusting OSM in v0.10 tiles, fixed in v1.0 tiles
Expand Down Expand Up @@ -1611,7 +1611,7 @@ layers:
filter: { not: { kind: [platform] }, $zoom: { min: 14 } }
draw:
lines:
order: function() { return feature.sort_key || 275; }
order: function() { return feature.sort_rank || 275; }
railway:
filter: { kind: [railway,train] }
draw:
Expand Down Expand Up @@ -3571,7 +3571,7 @@ layers:
lines:
outline:
# except bridges and tunnels, their outlines should also self-sort
order: function() { return feature.sort_key || 305; }
order: function() { return feature.sort_rank || 305; }

buildings:
data: { source: mapzen, layer: buildings }
Expand Down
12 changes: 8 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@

<!-- Main tangram library -->
<!-- production -->
<script src="https://mapzen.com/tangram/0.11/tangram.min.js"></script>
<script src="https://mapzen.com/tangram/0.12/tangram.min.js"></script>
<!-- production debug -->
<!-- <script src="https://mapzen.com/tangram/0.11/tangram.debug.js"></script> -->
<!-- <script src="https://mapzen.com/tangram/0.12/tangram.debug.js"></script> -->
<!-- dev -->
<!-- <script src="https://precog.mapzen.com/tangrams/tangram/master/dist/tangram.debug.js"></script> -->
<!-- dev branch -->
<!-- <script src="https://precog.mapzen.com/tangrams/tangram/labels-rebase/dist/tangram.min.js"></script> -->
<!-- <script src="https://precog.mapzen.com/tangrams/tangram/labels-rebase-test/dist/tangram.min.js"></script> -->

<!-- A lightweight graphical user interface for changing variables in JavaScript. -->
<script type="text/javascript" src="lib/dat.gui.min.js"></script>
Expand Down Expand Up @@ -627,14 +627,18 @@
// enable iD to show properties sidebar for selected feature
osm_type = 'node';
osm_zoom = '19'
if( selection.feature.properties.sort_key ) {
// tilezen adds sort_rank for any way or relation thing, but because we generate
// label positions for area features, we need to do two tests
if( selection.feature.properties.sort_rank || selection.feature.properties.area ) {
osm_type = 'way';
osm_zoom = Math.max( 17, map.getZoom() );
}
osm_id = selection.feature.properties.id;
if( osm_id < 0 ) {
osm_type = 'relation'
osm_id = Math.abs( osm_id );
// zoom out a bit because we assume this is a larger feature
// but don't zoom out too far, as iD breaks
osm_zoom = Math.max( 16, map.getZoom() );
}
url += osm_type + '=' + osm_id;
Expand Down

0 comments on commit 6b54da0

Please sign in to comment.