Replies: 2 comments
-
Hi @ohrie COMMENT ON FUNCTION "public"."function_zxy_query" ( "z" int4, "x" int4, "y" int4, "query" json ) IS '
{
"description": null,
"fields":{
"Gid":"int4",
"TABLE":"text"
},
"foo": {"bar": "foo"}
}
'; async@LAPTOP-PLI51BMO:~/repos/martin$ curl http://localhost:3000/function_zxy_query
{"tilejson":"3.0.0","tiles":["http://localhost:3000/function_zxy_query/{z}/{x}/{y}"],"name":"function_zxy_query","fields":{"Gid":"int4","TABLE":"text"},"foo":{"bar":"foo"}} |
Beta Was this translation helpful? Give feedback.
-
@ohrie you are correct that, per specification, tilejson must include We cannot really fix this automatically because Martin has no idea which tiles are available. Only after the first tiles have been requested, we could, in theory, wait until the first tiles start being generated, parse them, figure out available fields, and update |
Beta Was this translation helpful? Give feedback.
-
When using the (simple function) example from martin docs for PostgreSQL Function Sources, the resulting TileJSON looks like this:
This is not a valid TileJSON, because the TileJSON spec requires the
fields
attribute to be present. Therefore the usage in MapLibre fails.I currently don't know how to implement an according solution. The solution modyfing the TileJSON via the
COMMENT
SQL statement further down the docs didn't work.Beta Was this translation helpful? Give feedback.
All reactions