There appears to be a naming inconsistency with the XYZ layer configuration's url property.
The Javascript (plugins/layer_types/openlayers_layer_type_xyz.js) references a property called: options.url. Whereas the form that creates XYZ layers (plugins/layer_types/openlayers_layer_type_xyz.inc) saves the property $form['base_url'] which leads to a options.base_url value in Javascript.
To confuse things a little further, the default XYZ layers in (includes/openlayers.layers.inc) define a 'url' value but if these layers are cloned, edited and exported, they end up with 'base_url' values. These then break as the Javascript checks for options.url.
Attached a patch that changes the XYZ layer form element name from 'base_url' to 'url' to avoid having to update all the default XYZ layers.
| Comment | File | Size | Author |
|---|---|---|---|
| openlayers_xyz_url.patch | 970 bytes | tnightingale |
Comments
Comment #1
zzolo commentedThanks @tnightingale for the patch. This is a problem, but I am concerned about existing layers that people have saved. Have you tested the upgrade path?
Comment #2
polSee #1135274: Cloning OSM Mapnik (Default) do not set the 'url' parameter correctly + patch solution.