Closed jampukka closed 1 year ago
Hmm, the proxying GetLayerTile route seems to be the only one using urlTemplate from options: https://github.com/oskariorg/oskari-server/blob/master/control-base/src/main/java/fi/nls/oskari/control/layer/GetLayerTileHandler.java#L175? I suppose we should update that to get the url from capabilities. It doesn't look like it gets set anymore when updating capabilities.
Yes, that's the one I ran into and almost couldn't figure out why the request still went to the old URL (which the error message kindly told me) even though both the url and the capabilities had been succesfully updated.
I guess the fix is already visioned in the code // TODO: look at GetLayerCapabilitiesHandler and get resource url from capabilities instead
(https://github.com/oskariorg/oskari-server/blob/master/control-base/src/main/java/fi/nls/oskari/control/layer/GetLayerTileHandler.java#L174).
So the fix would be to remove options.tileUrl
from having any effect anywhere? If so then it would be nice to add a db migration to remove the field from options
object from all maplayers (or just wmtslayer
s). This should be rather safe change to make, I doubt anyone is using options.tileUrl
for proxied layers to override the URLs from Capabilities.
So the fix would be to remove
options.tileUrl
from having any effect anywhere? If so then it would be nice to add a db migration to remove the field fromoptions
object from all maplayers (or justwmtslayer
s). This should be rather safe change to make, I doubt anyone is usingoptions.tileUrl
for proxied layers to override the URLs from Capabilities.
True, true 👍
Fix will be included in 2.11 (due late May-early June)
Changing url of a
wmtslayer
and then refreshing capabilities from the new endpoint changes both url and the parsed capabilities of the maplayer correctly. However changing them does not alteroptions.urlTemplate
, which, if set, determines the actual url to use when requesting tiles from the service for wmtslayers that are proxied via oskari-server through GetLayerTile.--edit: specify that
options.urlTemplate
only applies to proxied wmtslayers