Closed cholmes closed 4 years ago
I like the suggestion and I cannot do any harm accepting it. I will include this in the next draft of the tiles specification.
We have a problem with templates: They are not very useful if you do not know the logic of the variables so they are difficult to use in naive clients. Even for a expert it is difficult to use a tile URL and not get a boring "sea" tile (70% of the planent is water). I wonder if we could add a example
key for the server to provide a nice example for the tile.
An alternative could be to actually to include the example in the href
attribute and a template
attribute with the actual template.
I like the example idea, but I think that should be its own ticket as opposed to re-opening this one? The URI used was already a templated one, this was just adding a mechanism to make it clear to a client that this is a template.
I think a clear 'example' tile is better than using an example in the href with a template attribute, since I don't think anyone wants a random tile...
@joanma747
As suggested by @cholmes, please move the contents of https://github.com/opengeospatial/OGC-API-Tiles/issues/16#issuecomment-619957332 into a new ticket and close this ticket.
We have add the "templated"
Decision was href= is a URI template if templated='true'.
In MapML they use "tref" to point to a templated href. https://github.com/Maps4HTML/MapML-Proposal
This is not json but an html extension but I believe is equally relevant. I'm still not convinced that is it a good idea to have a URI template in href.
Joan
I understand the concern, but from a processing perspective there is no difference between a tref
attribute and href
with templated=true
. In both cases we classify something as a link that isn't a link until the template parameters are resolved/replaced and provide a mechanism how to detect this.
tref
has been invented by MapML, if I am not mistaken, and templated
comes from HAL. I would say that we either leave it as it is or do not use a Link object for the templates at all (i.e., the templates wouldn't be in the links
array).
the templates wouldn't be in the links array
This is not a good alternative. It will complicate the "follow the links" approach. so I prefer the "leave it as it is" alternative.
(Note that I was not reopening the issue (that remains closed for now). I have just found another place were they have the same problem and adopted a similar but different solution and I wanted to document it. Sorry if I was insisting on my preferences simultaneously. I should not do that at this stage. I confirm "tref" is a solution invented by MapML)
See https://github.com/opengeospatial/OGC-API-Tiles/issues/3#issuecomment-585651139