Skip to content

Defining min/maxzoom in PG function and autodetecting with Martin #1691

Answered by nyurik
dericke asked this question in Q&A
Discussion options

You must be logged in to vote

@dericke take a look at customizing tilejson using a sql comment. You should still do the zoom filtering in the function, but adding it to tilejson will make sure maplibre won't even request it. You only do it from SQL - next to your function you can create a SQL comment that will be stored in the same database attached to your function. Martin should not be analyzing function code to see if it checks the zoom or not -- as this cannot be solved in a general case by definition (see Halting problem). So to keep things simple - an SQL comment is really an ideal solution IMO, as this is the closest thing to an attribute that SQL has.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dericke
Comment options

@nyurik
Comment options

Answer selected by dericke
@dericke
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants