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

Vector tile drawing for .mvt and .pbf format #5072

Merged
merged 97 commits into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
d036af8
add logic to set maxZoom of esri layers interactively
jgravois Apr 5, 2018
617eb06
use d3_json instead of fetch
jgravois May 10, 2018
7c9ad51
merge with Master changes
LorenMueller Jun 14, 2018
0124837
merge from Master 2
LorenMueller Jun 14, 2018
34fa12a
use existing method to trigger tilemap
jgravois Jun 14, 2018
eaa9d8d
fix recomposed tilemap url
jgravois Jun 15, 2018
eb8bf19
button appeared
vershwal May 21, 2018
3730131
button appeared
vershwal May 21, 2018
f247c31
button works with .gpx
vershwal May 22, 2018
7eebd5a
button works well with .gpx
vershwal May 23, 2018
6780f91
works with geojson.
vershwal May 23, 2018
39d5bed
Still empty tile.layers
vershwal May 29, 2018
652d2ed
First few points drawn using .pbf format
vershwal May 29, 2018
0cfdfdd
Cleaning code: a separate function vtToGeoJson, support .mvt and .pbf
vershwal May 31, 2018
6587bd6
changed x,y,z.
vershwal Jun 5, 2018
570bb62
URL mvt drawing
vershwal Jun 8, 2018
2b02a44
fixed small errors.
vershwal Jun 11, 2018
7919f59
Fixed test file layers.js.
vershwal Jun 11, 2018
66f2781
reading array buffer data from url and passing x, y, z to togeojson f…
vershwal Jun 16, 2018
ab60d57
Working fine with a given mvt URL.
vershwal Jun 17, 2018
1049d4b
resolving merge conflicts
vershwal Jun 17, 2018
723155e
Add `building` and `bench` fields to `amenity=shelter` preset
bhousel Jun 18, 2018
7de54a3
Fix feature test - amenity=shelter no longer matches building rule
bhousel Jun 18, 2018
661c133
Remove rollup cache so live reload works again
bhousel Jun 18, 2018
1b16d47
Added name field to motorway_junction
vershwal Jun 19, 2018
65dc044
Merge pull request #5092 from vershwal/motorway
bhousel Jun 19, 2018
81bddf2
'q' lib as dependency; updated streetside for higher resolution imagery
LorenMueller Jun 19, 2018
4c812b6
Return an abortable request from jsonp_request
bhousel Jun 20, 2018
4458b94
Add test coverage for streetside service
bhousel Jun 20, 2018
7d67816
Add `indoor` and `ref` fields to emergency=phone
bhousel Jun 20, 2018
716a3f7
Add a preset for `emergency=first_aid`
bhousel Jun 20, 2018
b238d44
Adjust default zoom for points to z19
bhousel Jun 21, 2018
2786974
Add preset for `emergency=siren`
bhousel Jun 21, 2018
1a93ed7
new var for toggle of 4 or 16 images per face
LorenMueller Jun 21, 2018
e145c1d
Merge branch 'streetside' of https://github.com/jharpster/iD into jha…
bhousel Jun 22, 2018
5f1c79c
pacify linter, gitignore vscode settings
bhousel Jun 22, 2018
abbffd5
Avoid recreating canvases when showing the layer, put under ms-wrappe…
bhousel Jun 22, 2018
d41cf5e
Wait to get canvas context until image is loaded, avoid some globals
bhousel Jun 22, 2018
fb324dd
Allow d3.geo.tile to fetch margin tiles (beyond viewport covering)
bhousel Jun 22, 2018
db1c896
removed: user mocks from image service test specs
thomas-hervey Jun 22, 2018
d69ff02
Return the marginal tiles at the end of the tiles array
bhousel Jun 22, 2018
b7df31b
Update styles, reenter bubbles with new key when sequences connected
bhousel Jun 22, 2018
0c34ebd
Dont fetch margin tiles when testing
bhousel Jun 22, 2018
5975f0d
Support resolution up to 2048, more zoom
bhousel Jun 22, 2018
e2e3588
Add high resolution checkbox
bhousel Jun 22, 2018
917c6dd
Add hires checkbox to toggle 512 and 1024 resolutions
bhousel Jun 23, 2018
c5a2172
Add "road" and "street" as search terms for all road presets
bhousel Jun 23, 2018
7716532
Class surface as `lowzoom` around z17-z18.5 (based on latitude)
bhousel Jun 23, 2018
a5b8e4b
Rename from `emergency=first_aid` to `emergency=first_aid_kit`
bhousel Jun 24, 2018
b1252d4
Add booth field to telephone presets
bhousel Jun 24, 2018
39e170d
Add `royal_cypher` to the capital letter allowing whitelist
bhousel Jun 24, 2018
9f7e55b
Add height, name fields to `natural=cliff`, improve search terms
bhousel Jun 24, 2018
ec6ab6e
Add preset for `emergency=fire_alarm_box`
bhousel Jun 24, 2018
112ef76
Add preset for `emergency=lifeguard`
bhousel Jun 24, 2018
1309e7a
chore(package): update osm-community-index to version 0.4.5
greenkeeper[bot] Jun 25, 2018
6a79f26
Blacklist more worldwide imagery sources that are generated from osm
bhousel Jun 25, 2018
048ea07
npm run imagery
bhousel Jun 25, 2018
7ff178b
Add attribute `height` to tag for retaining_wall
tordans Jun 25, 2018
6ce2c5e
Merge pull request #5113 from tordans/patch-1
bhousel Jun 25, 2018
c9e9135
npm run build to update retaining wall height field
bhousel Jun 25, 2018
bc01939
Actually throttle connection, filter out bad term translations
bhousel Jun 25, 2018
a0a4e68
npm run translations
bhousel Jun 25, 2018
6ac9e4f
v2.9.1
bhousel Jun 26, 2018
6a7e56a
A few more translations
bhousel Jun 26, 2018
3943364
Merge pull request #5106 from openstreetmap/remove_test_user_mocks
bhousel Jun 27, 2018
9bb3022
Remove duplicate entry from .gitignore
bhousel Jun 27, 2018
154a49b
Upgrade to eslint v5.0.0
bhousel Jun 27, 2018
53a00c0
npm run imagery
bhousel Jun 28, 2018
74e70f5
npm run translations
bhousel Jun 28, 2018
98e4fed
v2.9.2
bhousel Jun 28, 2018
b6fb3a3
Fetch Esri tilemap at high zoom to determine max zoom
bhousel Jun 29, 2018
d668f79
Merge branch 'jgravois-tilemap'
bhousel Jun 29, 2018
76d21c8
stub test/spec/svg/gpx.js
bhousel Jun 29, 2018
dd951a9
use 22 as maxZoom for Esri imagery (selectively)
jgravois Jun 29, 2018
50c371f
continue to catch 404s
jgravois Jun 29, 2018
f02630a
Restore rollup-plugin-includepaths dependency for finding d3
bhousel Jun 29, 2018
21a7ed2
Add doublequotes to iD-sprite input file param so glob works on Windows
bhousel Jun 29, 2018
9ba517e
Merge pull request #5116 from jgravois/patch-1
bhousel Jun 29, 2018
095ae13
Add capacity to playground:swing-preset
tordans Jul 3, 2018
96794d2
Merge pull request #5120 from tordans/patch-2
bhousel Jul 3, 2018
68a3e6e
npm run build
bhousel Jul 3, 2018
73ac628
gpx tests.
vershwal Jul 4, 2018
4cc080b
Use XHR to fetch imagery metadata instead of JSONP
tomhughes Jul 4, 2018
1ab7cf7
Use XHR to access wikipedia API instead of JSONP
tomhughes Jul 4, 2018
3819fd6
Use XHR to access wikidata API instead of JSONP
tomhughes Jul 4, 2018
d617d9c
Fix wikipedia UI tests to mock XHR instead of JSONP
tomhughes Jul 4, 2018
faf12a1
Merge pull request #5123 from tomhughes/xhr
bhousel Jul 5, 2018
416ae66
Support more direction tags for reversal in Reverse action
bhousel Jul 5, 2018
3e334b1
Attempt to improve entrance searchability
tohaklim Jul 7, 2018
ed7c652
Merge pull request #5130 from tohaklim/patch-2
bhousel Jul 8, 2018
fae4858
npm run build
bhousel Jul 8, 2018
ef77121
Merge branch 'gpxtext' of https://github.com/vershwal/iD into vershwa…
bhousel Jul 8, 2018
de12396
Fix projection so the map is where the point is
bhousel Jul 8, 2018
4fda478
Merge branch 'check' of https://github.com/vershwal/iD into vershwal-…
bhousel Jul 9, 2018
a52eeb9
Fix failing tests, lint errors, merge conflicts
bhousel Jul 9, 2018
99e7366
swap d3_fetch for d3_request (for backward compatability with IE11)
bhousel Jul 9, 2018
69e8309
Fix icon names in map_data panel
bhousel Jul 9, 2018
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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.esm-cache
.vscode/
/data/data.js
/dist/*.js
/dist/*.css
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.DS_Store
.esm-cache
.vscode/
.travis.yml
/.tx/
/data/data.js
Expand Down
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,67 @@ _Breaking changes, which may affect downstream projects or sites that embed iD,
[@xxxx]: https://github.com/xxxx
-->

# 2.9.2
##### Jun 28, 2018

#### :sparkles: Usability
* This release contains a few updates to the background imagery list


# 2.9.1
##### Jun 25, 2018

#### :sparkles: Usability
* Improve the resolution of Bing Streetside ([#5102], thanks [@jharpster], [@LorenMueller])
* Adjust viewer parameters to allow users to zoom in more
* Add checkbox to toggle between low resolution (faster) and high resolution (slower)
* Switch low zoom map style based on latitude (improves width of roads closer to equator) ([#5101])
* Don't zoom in so far when searching for a point ([#5099])
* `amenity=shelter` no longer assumed to be a building for rendering or feature filtering ([#5084])

[#5102]: https://github.com/openstreetmap/iD/issues/5102
[#5101]: https://github.com/openstreetmap/iD/issues/5101
[#5099]: https://github.com/openstreetmap/iD/issues/5099
[#5084]: https://github.com/openstreetmap/iD/issues/5084
[@jharpster]: https://github.com/jharpster
[@LorenMueller]: https://github.com/LorenMueller

#### :bug: Bugfixes
* Add `royal_cypher` to list of tags that allow capital letters ([#5109])
* Fix bug that caused '0' to be written into a numeric field when tabbing ([#5087])

[#5109]: https://github.com/openstreetmap/iD/issues/5109
[#5087]: https://github.com/openstreetmap/iD/issues/5087

#### :mortar_board: Walkthrough / Help
* Use "Esri World Imagery (Clarity)" imagery in the intro walkthrough

#### :rocket: Presets
* Add field `height` to `barrier=retaining_wall` preset ([#5113], thanks [@tordans])
* Add preset for `emergency=lifeguard` ([#4918])
* Add preset for `emergency=fire_alarm_box`
* Add `height`, `name` fields to `natural=cliff` preset, improve search terms ([#5095])
* Add booth field to telephone presets ([#5088])
* Add "road" and "street" as search terms for all road presets ([#5103])
* Add preset for `emergency=siren` ([#5100])
* Add a preset for `emergency=first_aid_kit` ([#5097])
* Add `indoor` and `ref` fields to `emergency=phone` preset
* Add `name` field to `highway=motorway_junction` preset ([#5090], [#5092], thanks [@vershwal])
* Add `building` and `bench` fields to `amenity=shelter` preset ([#5084])

[#5113]: https://github.com/openstreetmap/iD/issues/5113
[#5103]: https://github.com/openstreetmap/iD/issues/5103
[#5100]: https://github.com/openstreetmap/iD/issues/5100
[#5097]: https://github.com/openstreetmap/iD/issues/5097
[#5095]: https://github.com/openstreetmap/iD/issues/5095
[#5092]: https://github.com/openstreetmap/iD/issues/5092
[#5090]: https://github.com/openstreetmap/iD/issues/5090
[#5088]: https://github.com/openstreetmap/iD/issues/5088
[#5084]: https://github.com/openstreetmap/iD/issues/5084
[#4918]: https://github.com/openstreetmap/iD/issues/4918
[@tordans]: https://github.com/tordans
[@vershwal]: https://github.com/vershwal


# 2.9.0
##### Jun 14, 2018
Expand Down
14 changes: 7 additions & 7 deletions build_src.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

const fs = require('fs');
const rollup = require('rollup');
const nodeResolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const includePaths = require('rollup-plugin-includepaths');
const nodeResolve = require('rollup-plugin-node-resolve');
const json = require('rollup-plugin-json');
const colors = require('colors/safe');

module.exports = function buildSrc() {
var cache;
var building = false;
return function () {
if (building) return;
Expand All @@ -26,18 +26,19 @@ module.exports = function buildSrc() {
.rollup({
input: './modules/id.js',
plugins: [
includePaths( {
paths: ['node_modules/d3/node_modules'] // npm2 or windows
}),
nodeResolve({
module: true,
main: true,
browser: false
}),
commonjs(),
json( { indent: '' })
],
cache: cache
json({ indent: '' })
]
})
.then(function (bundle) {
cache = bundle;
return bundle.write({
format: 'iife',
file: 'dist/iD.js',
Expand All @@ -51,7 +52,6 @@ module.exports = function buildSrc() {
})
.catch(function (err) {
building = false;
cache = undefined;
console.error(err);
process.exit(1);
});
Expand Down
29 changes: 29 additions & 0 deletions css/20_map.css
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,32 @@ text.gpxlabel-halo {
stroke-miterlimit: 1;
}

/* MVT Paths */

.layer-mvt {
pointer-events: none;
}

path.mvt {
stroke: #ff26d4;
stroke-width: 2;
fill: none;
}

text.mvtlabel-halo,
text.mvtlabel {
font-size: 10px;
font-weight: bold;
dominant-baseline: middle;
}

text.mvtlabel {
fill: #ff26d4;
}

text.mvtlabel-halo {
opacity: 0.7;
stroke: #000;
stroke-width: 5px;
stroke-miterlimit: 1;
}
11 changes: 4 additions & 7 deletions css/50_misc.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,14 @@ path.casing.tag-status {


/* Buildings */
path.stroke.tag-building,
path.stroke.tag-amenity-shelter {
path.stroke.tag-building {
stroke: rgb(224, 110, 95);
}
path.fill.tag-building,
path.fill.tag-amenity-shelter {
path.fill.tag-building {
stroke: rgba(224, 110, 95, 0.3);
fill: rgba(224, 110, 95, 0.3);
}
.preset-icon-fill-area.tag-building,
.preset-icon-fill-area.tag-amenity-shelter {
.preset-icon-fill-area.tag-building {
border-color: rgb(224, 110, 95);
background-color: rgba(224, 110, 95, 0.3);
}
Expand Down Expand Up @@ -263,4 +260,4 @@ path.stroke.tag-man_made-pier {
stroke-width: 1;
stroke-linecap: butt;
stroke-dasharray: 3, 3;
}
}
15 changes: 15 additions & 0 deletions css/60_photos.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,21 @@
background-repeat: no-repeat no-repeat;
}

label.streetside-hires {
float: left;
padding: 0 10px;
cursor: pointer;
}
.streetside-hires span {
margin-top: 2px;
}
.streetside-hires input[type="checkbox"] {
float: left;
width: 12px;
height: 12px;
margin: 0 5px;
}


/* Mapillary viewer */
#mly .domRenderer .TagSymbol {
Expand Down
4 changes: 4 additions & 0 deletions css/80_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -2521,6 +2521,10 @@ div.full-screen > button:hover {
transform: rotateY(180deg);
}

[dir='rtl'] .list-item-mvt-browse svg {
transform: rotateY(180deg);
}

/* make sure tooltip fits in map-control panel */
/* if too wide, placement will be wrong the first time it displays */
.layer-list li.best .tooltip-inner {
Expand Down
8 changes: 7 additions & 1 deletion data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -585,14 +585,20 @@ en:
cannot_zoom: "Cannot zoom out further in current mode."
full_screen: Toggle Full Screen
gpx:
local_layer: "Local file"
local_layer: "Add a GPX"
drag_drop: "Drag and drop a .gpx, .geojson or .kml file on the page, or click the button to the right to browse"
zoom: "Zoom to layer"
browse: "Browse for a file"
mvt:
local_layer: "Add a MVT"
drag_drop: "Drag and drop a .mvt or .pbf file on the page, or click the button to the right to browse"
zoom: "Zoom to layer"
browse: "Browse for a file"
streetside:
tooltip: "Streetside photos from Microsoft"
title: "Photo Overlay (Bing Streetside)"
report: Report a privacy concern with this image
hires: "High resolution"
mapillary_images:
tooltip: "Street-level photos from Mapillary"
title: "Photo Overlay (Mapillary)"
Expand Down
Loading