t-rex-tileserver / t-rex

t-rex is a vector tile server specialized on publishing MVT tiles from your own data
https://t-rex.tileserver.ch/
MIT License
545 stars 68 forks source link

Parameters to filter data in a SQL query #267

Open vladimir-rybalko opened 2 years ago

vladimir-rybalko commented 2 years ago

Hi!

I try configure t_rex for display more than 7k points from PG. Each user have uid in database. I want filtering data that belongs to the user. How can I pass a parameter to filter data in a SQL query?

pka commented 2 years ago

There is no built-in way to pass a parameter at runtime. What comes close is some cases is using the templating functionallity of the config file like in this example. In your case you could create a layer for each uid, but that's probably not what you want.

pka commented 2 years ago

After beeing reminded of #204, I think that runtime query parameters have a major drawback, because they make tile caching a lot more complicate.