From 839e6995825dd5aa2cbbfba22ac4dd049d2cae06 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Sun, 16 Nov 2025 21:25:11 +0000 Subject: [PATCH] Add organization_id parameter to Tegola This makes it possible to separate data by organization for different clients --- configs/tegola.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configs/tegola.toml b/configs/tegola.toml index bef93ca..04b48cd 100644 --- a/configs/tegola.toml +++ b/configs/tegola.toml @@ -55,7 +55,7 @@ srid = 4326 # The default srid for this provider. If not provided it geometry_fieldname = "geometry" geometry_type="polygon" id_fieldname = "id" - sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, cell, count_, resolution FROM h3_aggregation WHERE geometry && !BBOX!" + sql = "SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, cell, count_, resolution FROM h3_aggregation WHERE geometry && !BBOX! !PARAM!" [[maps]] name = "bonn" @@ -90,3 +90,10 @@ center = [-119.175, 36.24, 11.0] # set the center of the map so the user is auto provider_layer = "nidus.h3_aggregation" #min_zoom = 5 #max_zoom = 20 + + [[maps.params]] + name = "organization_id" + token = "!PARAM!" + type = "int" + sql = "AND organization_id = ?" + default_sql = "1"