We can configure in the tiler/UI the CDN urls and return them on both layergroup and viz.json. Cartodb.js should honor this CDN information returned by the tiler
so the layergroup now can include extra metadata extracted from configuration parameter serverMetadata
@strk could you review server_metadata branch ?
Uhm. It's an arbitrary js object to return togheter with any layergroup creation response, right ?
No problem with that, but it sounds like something that would go to 1.9.0.
Why do you see this better done by tiler than by, say, some other endpoint to fetch general "service metadata" for the whole of cartodb ?
Also I'd use a label to wrap that arbitrary objet. Could keep the "serverMetadata" label, for example.
That way it would be impossible to clash with any "official" element name.
@strk talk with @jatorre about that metadata service
Not sure what a service metadata API could be. I believe this belongs here as it defines from where to get the tiles. No need for a second request to a metadata service, the map info response tell me where to grab the data from, I see it very well in here.
Regarding the arbitrary object for the serverMetadata I dont have an oppinion of course.
@strk about arbitrary object, what problems do you see? you can document the options in there
@javisantana you mean it's not arbitrary ? In that case yes, please document it.
It'd belong here: https://github.com/CartoDB/Windshaft-cartodb/blob/master/docs/MultiLayer-API.md
Thath API document would also need to get a version. In any case since it moved into the repository it could inherit the version of the code (Major.Minor). Given 1.8 did not have the new labels I'd put this into a 1.9.
Another thing... would it make sense, for greater flexibility, to provide those urls as templates ?
That way the template could even embed the full token and would not be specific to a "CDN".
It would also be easy to provide a default, being based on the same base url as the request that requested the map.
You pushed it in master, belongs to your branch instead
I'm going to merge this branch to master right now
Ok, I pushed a "b1.8" branch upstream, to save it from the barbarians :)
added serverMetadata option for layer group, close #182 CDB-1940
ok, merging to b1.8 too
So the commit is in master, targetted at 1.9.0 -- I'm closing this.
Merge tag '1.9.0' into cdb
- Allow to set server related configuration in serverMetadata (#182)