Giter Site home page Giter Site logo

Comments (2)

sharkAndshark avatar sharkAndshark commented on June 11, 2024

Hi @ohrie
I tried this on the test database and it still works. Would you mind share you SQL here?

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"}}

from martin.

nyurik avatar nyurik commented on June 11, 2024

@ohrie you are correct that, per specification, tilejson must include vector_layers value that has a fields sub-value. The example in the documentation actually does that. There is one issue: in the Modifying TileJSON section it says that it generates tilejson automatically, but does not say that it is not a fully valid tilejson unless the content of the tile is non-vector (but at the moment there is no way for the user to specify that).

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 vector_layers, but this feels like a very hacky, imperfect, and unstable solution (tiles may not include all possible fields).

from martin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.