Adding attribution control and attribution.
This commit is contained in:
+16
-1
@@ -4,4 +4,19 @@ goog.provide('ol.layer.Layer');
|
||||
* @constructor
|
||||
* @export
|
||||
*/
|
||||
ol.layer.Layer = function() {};
|
||||
ol.layer.Layer = function() {
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @protected
|
||||
*/
|
||||
this.attribution_;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
ol.layer.Layer.prototype.getAttribution = function() {
|
||||
return this.attribution_;
|
||||
};
|
||||
|
||||
+6
-1
@@ -9,7 +9,12 @@ goog.require('ol.layer.XYZ');
|
||||
* @constructor
|
||||
* @extends {ol.layer.XYZ}
|
||||
*/
|
||||
ol.layer.OSM = function() {
|
||||
ol.layer.OSM = function() {
|
||||
|
||||
//TODO Is this attribution still correct?
|
||||
/** @inheritDoc */
|
||||
this.attribution_ = "Data CC-By-SA by <a target='_blank' href='http://openstreetmap.org/'>OpenStreetMap</a>";
|
||||
|
||||
goog.base(this, 'http://a.tile.openstreetmap.org/{z}/{x}/{y}.png');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user