From 45347c3d2ac076196140e338cc614eb874448ce3 Mon Sep 17 00:00:00 2001 From: Nathaniel Kelso Date: Thu, 9 Feb 2017 13:27:44 -0800 Subject: [PATCH 1/4] fix bug in OSM edit in iD link construction, thanks Chuck --- index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 83aa8fb..afdbd0e 100755 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ - + @@ -627,7 +627,9 @@ // enable iD to show properties sidebar for selected feature osm_type = 'node'; osm_zoom = '19' - if( selection.feature.properties.sort_key ) { + // tilezen adds sort_key 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_key || selection.feature.properties.area ) { osm_type = 'way'; osm_zoom = Math.max( 17, map.getZoom() ); } @@ -635,6 +637,8 @@ 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; From 5ae06b18d733fe59eab368e95ffe915c6c4bf4c7 Mon Sep 17 00:00:00 2001 From: Nathaniel Kelso Date: Mon, 20 Mar 2017 12:19:32 -0700 Subject: [PATCH 2/4] remove default API key for vector tiles, a major breaking change to v7 --- VERSION | 2 +- bubble-wrap-style-more-labels.yaml | 2 +- bubble-wrap-style-no-labels.yaml | 2 +- bubble-wrap-style.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 6d54bbd..4122521 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.1 \ No newline at end of file +7.0.0 \ No newline at end of file diff --git a/bubble-wrap-style-more-labels.yaml b/bubble-wrap-style-more-labels.yaml index 001aef6..3903f9e 100644 --- a/bubble-wrap-style-more-labels.yaml +++ b/bubble-wrap-style-more-labels.yaml @@ -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 diff --git a/bubble-wrap-style-no-labels.yaml b/bubble-wrap-style-no-labels.yaml index f682d3b..b060651 100644 --- a/bubble-wrap-style-no-labels.yaml +++ b/bubble-wrap-style-no-labels.yaml @@ -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 diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 8f3b60c..37e5649 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -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 From 36ec1ed08ce0befcff25a7231c15ad7ae830509c Mon Sep 17 00:00:00 2001 From: Nathaniel Kelso Date: Fri, 24 Mar 2017 15:51:21 -0700 Subject: [PATCH 3/4] oops, v1 vector tiles renamed sort_key to sort_rank --- bubble-wrap-style-more-labels.yaml | 4 ++-- bubble-wrap-style-no-labels.yaml | 4 ++-- bubble-wrap-style.yaml | 4 ++-- index.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bubble-wrap-style-more-labels.yaml b/bubble-wrap-style-more-labels.yaml index 3903f9e..4e29ab2 100644 --- a/bubble-wrap-style-more-labels.yaml +++ b/bubble-wrap-style-more-labels.yaml @@ -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: @@ -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 } diff --git a/bubble-wrap-style-no-labels.yaml b/bubble-wrap-style-no-labels.yaml index b060651..8cde3b3 100644 --- a/bubble-wrap-style-no-labels.yaml +++ b/bubble-wrap-style-no-labels.yaml @@ -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: @@ -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 } diff --git a/bubble-wrap-style.yaml b/bubble-wrap-style.yaml index 37e5649..d4e7bf7 100644 --- a/bubble-wrap-style.yaml +++ b/bubble-wrap-style.yaml @@ -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: @@ -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 } diff --git a/index.html b/index.html index afdbd0e..6670479 100755 --- a/index.html +++ b/index.html @@ -627,9 +627,9 @@ // enable iD to show properties sidebar for selected feature osm_type = 'node'; osm_zoom = '19' - // tilezen adds sort_key for any way or relation thing, but because we generate + // 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_key || selection.feature.properties.area ) { + if( selection.feature.properties.sort_rank || selection.feature.properties.area ) { osm_type = 'way'; osm_zoom = Math.max( 17, map.getZoom() ); } From da08f5490a824f5e320075060b96463859bb6148 Mon Sep 17 00:00:00 2001 From: Nathaniel Kelso Date: Fri, 24 Mar 2017 15:56:26 -0700 Subject: [PATCH 4/4] let there be curved labels: tangram v0.12 --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 6670479..67830d5 100755 --- a/index.html +++ b/index.html @@ -22,9 +22,9 @@ - + - +