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

Viewport collision detection #5150

Merged
merged 18 commits into from
Oct 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e53bb16
Add "clone()" to Transform to facilitate saving Transform state.
ChrisLoer Aug 15, 2017
99fb1b8
Introduce new variant of grid-index:
ChrisLoer Aug 15, 2017
b1c79ba
Make test-query store "actual.json" for debugging purposes.
ChrisLoer Aug 15, 2017
8e3c2fd
Add indexed getter methods to StructArray.
ChrisLoer Aug 15, 2017
18ed235
Add CrossTileSymbolIndex, responsible for tracking "duplicate" symbol…
ChrisLoer Aug 15, 2017
de059c2
Add Placement class, responsible for tracking the current state of a …
ChrisLoer Aug 15, 2017
6feb9bf
Viewport collision detection:
ChrisLoer Oct 5, 2017
455dec2
Update symbol shaders for viewport collision.
ChrisLoer Aug 15, 2017
0b105c3
Update collision debug shaders to draw new box/circles generated by v…
ChrisLoer Aug 15, 2017
a8fa58c
Update unit tests for viewport collision.
ChrisLoer Aug 15, 2017
78d48bd
Update existing render tests to account for change to viewport collis…
ChrisLoer Aug 15, 2017
4d59a89
New tests for viewport-collision detection:
ChrisLoer Oct 17, 2017
2263bbc
Update debug.html to use viewport-aligned labels.
ChrisLoer Aug 15, 2017
1306c90
Force placement of line labels with `text-allow-overlap`, even if non…
ChrisLoer Oct 4, 2017
65df35c
Text sizing at placement time is independent of scale, so avoid unnec…
ChrisLoer Oct 4, 2017
f205ece
Explanatory comment for a tricky detail that confused me in the port.
ChrisLoer Oct 5, 2017
eb064d9
Review changes:
ChrisLoer Oct 17, 2017
dd91fa4
Rename:
ChrisLoer Oct 17, 2017
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
Expand Up @@ -15,5 +15,6 @@ flow-coverage
*-generated.js
test/integration/**/index*.html
test/integration/**/actual.png
test/integration/**/actual.json
test/integration/**/diff.png
.eslintcache
57 changes: 57 additions & 0 deletions debug/cross_source_points.geojson
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-77.01,
38.90
]
},
"properties": {
"name": "GeoJSON Source 1"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-77.01,
38.89
]
},
"properties": {
"name": "GeoJSON Source 2"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-77.03,
38.90
]
},
"properties": {
"name": "GeoJSON Source 3"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-77.03,
38.89
]
},
"properties": {
"name": "GeoJSON Source 4"
}
}
]
}
17 changes: 16 additions & 1 deletion debug/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
container: 'map',
zoom: 12.5,
center: [-77.01866, 38.888],
style: 'mapbox://styles/mapbox/streets-v9',
style: 'mapbox://styles/mapbox/streets-v10',
hash: true
});

Expand Down Expand Up @@ -67,6 +67,21 @@
"line-width": {"base": 1.5, "stops": [[5, 0.75], [18, 32]]}
}
}, 'country-label-lg');

map.addSource("points", {
"type": "geojson",
"data": '/debug/cross_source_points.geojson'
});

map.addLayer({
"id": "points",
"type": "symbol",
"source": "points",
"layout": {
"text-field": "{name}",
"text-font": ["Open Sans Semibold", "Arial Unicode MS Bold"]
}
});
});

map.on('click', function(e) {
Expand Down
Loading