Template for the Attribution control.
This allows to add map specific copyright, or copyright required for tools like geocoders that are used in the context of the map.
This commit is contained in:
@@ -24,6 +24,14 @@ OpenLayers.Control.Attribution =
|
||||
*/
|
||||
separator: ", ",
|
||||
|
||||
/**
|
||||
* APIProperty: template
|
||||
* {String} Template for the attribution. This has to include the substring
|
||||
* "${layers}", which will be replaced by the layer specific
|
||||
* attributions, separated by <separator>. The default is "${layers}".
|
||||
*/
|
||||
template: "${layers}",
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control.Attribution
|
||||
*
|
||||
@@ -86,7 +94,9 @@ OpenLayers.Control.Attribution =
|
||||
}
|
||||
}
|
||||
}
|
||||
this.div.innerHTML = attributions.join(this.separator);
|
||||
this.div.innerHTML = OpenLayers.String.format(this.template, {
|
||||
layers: attributions.join(this.separator)
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user