[core] fix circle querying for scale and alignment
This fixes circle querying for cases where either
circle-pitch-alignment=map
or
circle-pitch-scaling=viewport
This commit is contained in:
committed by
Ansis Brammanis
parent
f7d20a5871
commit
f86fe44dbd
@@ -82,11 +82,16 @@ bool lineIntersectsBufferedLine(const GeometryCoordinates& lineA, const Geometry
|
||||
return false;
|
||||
}
|
||||
|
||||
bool polygonIntersectsBufferedPoint(const GeometryCoordinates& polygon, const GeometryCoordinate& point, float radius) {
|
||||
if (polygonContainsPoint(polygon, point)) return true;
|
||||
if (pointIntersectsBufferedLine(point, polygon, radius)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool polygonIntersectsBufferedMultiPoint(const GeometryCoordinates& polygon, const GeometryCollection& rings, float radius) {
|
||||
for (auto& ring : rings) {
|
||||
for (auto& point : ring) {
|
||||
if (polygonContainsPoint(polygon, point)) return true;
|
||||
if (pointIntersectsBufferedLine(point, polygon, radius)) return true;
|
||||
if (polygonIntersectsBufferedPoint(polygon, point, radius)) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user