diff --git a/arches/app/views/api.py b/arches/app/views/api.py index 49a4b83d45c..b5083d47fef 100644 --- a/arches/app/views/api.py +++ b/arches/app/views/api.py @@ -319,7 +319,10 @@ def get(self, request, nodeid, zoom, x, y): nodeid, geom FROM geojson_geometries - WHERE id in %s + WHERE + ST_Intersects(geom, TileBBox(%s, %s, %s, 3857)) + AND + nodeid = %s and resourceinstanceid not in %s ) m ) SELECT ST_AsMVT( @@ -356,7 +359,7 @@ def get(self, request, nodeid, zoom, x, y): WHERE cid IS NOT NULL GROUP BY cid ) as tile;""", - [distance, min_points, search_geometries, nodeid, zoom, x, y, zoom, x, y], + [distance, min_points, zoom, x, y, nodeid, resource_ids, nodeid, zoom, x, y, zoom, x, y], ) else: tile = ""