-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Query point translation for multi-point geometry
- Loading branch information
Asheem Mamoowala
committed
Nov 12, 2018
1 parent
c708474
commit 050f6f4
Showing
3 changed files
with
139 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
test/integration/query-tests/circle-translate/box/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
[ | ||
{ | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
13.406662344932556, | ||
52.49845542419487 | ||
], | ||
[ | ||
13.406715989112854, | ||
52.49853706825692 | ||
], | ||
[ | ||
13.407037854194641, | ||
52.499007335102704 | ||
], | ||
[ | ||
13.40782642364502, | ||
52.50002296369735 | ||
], | ||
[ | ||
13.409215807914734, | ||
52.50175045812034 | ||
] | ||
] | ||
}, | ||
"type": "Feature", | ||
"properties": { | ||
"class": "main", | ||
"oneway": 0, | ||
"osm_id": 4612696, | ||
"type": "secondary" | ||
}, | ||
"id": 4612696, | ||
"source": "mapbox", | ||
"sourceLayer": "road", | ||
"state": {} | ||
}, | ||
{ | ||
"geometry": { | ||
"type": "LineString", | ||
"coordinates": [ | ||
[ | ||
13.404956459999084, | ||
52.50075446300568 | ||
], | ||
[ | ||
13.405857682228088, | ||
52.500525870779285 | ||
], | ||
[ | ||
13.40782642364502, | ||
52.50002296369735 | ||
], | ||
[ | ||
13.41029942035675, | ||
52.49939268890719 | ||
], | ||
[ | ||
13.410347700119019, | ||
52.49937962612168 | ||
], | ||
[ | ||
13.410476446151733, | ||
52.49934370344147 | ||
], | ||
[ | ||
13.410674929618835, | ||
52.499291452217875 | ||
], | ||
[ | ||
13.4122896194458, | ||
52.498840782836766 | ||
] | ||
] | ||
}, | ||
"type": "Feature", | ||
"properties": { | ||
"class": "street", | ||
"oneway": 0, | ||
"osm_id": 4612752, | ||
"type": "residential" | ||
}, | ||
"id": 4612752, | ||
"source": "mapbox", | ||
"sourceLayer": "road", | ||
"state": {} | ||
} | ||
] |
47 changes: 47 additions & 0 deletions
47
test/integration/query-tests/circle-translate/box/style.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"version": 8, | ||
"metadata": { | ||
"test": { | ||
"height": 256, | ||
"queryGeometry": [ | ||
[ | ||
30, | ||
130 | ||
], [ | ||
35, | ||
131 | ||
] | ||
] | ||
} | ||
}, | ||
"center": [ | ||
13.418056, | ||
52.499167 | ||
], | ||
"zoom": 14, | ||
"sources": { | ||
"mapbox": { | ||
"type": "vector", | ||
"maxzoom": 14, | ||
"tiles": [ | ||
"local://tiles/{z}-{x}-{y}.mvt" | ||
] | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "road", | ||
"type": "circle", | ||
"source": "mapbox", | ||
"source-layer": "road", | ||
"paint": { | ||
"circle-translate": [ | ||
20, | ||
30 | ||
], | ||
"circle-radius": 10 | ||
}, | ||
"interactive": true | ||
} | ||
] | ||
} |