Remove logos
This commit is contained in:
@@ -31,6 +31,10 @@ and calling it before using projections, and any time the proj4 registry was cha
|
|||||||
register(proj4);
|
register(proj4);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Removal of logos
|
||||||
|
|
||||||
|
The map and sources no longer accept a `logo` option. Instead, if you wish to append a logo to your map, add the desired markup directly in your HTML. In addition, you can use the `attributions` property of a source to display arbitrary markup per-source with the attribution control.
|
||||||
|
|
||||||
### v4.6.0
|
### v4.6.0
|
||||||
|
|
||||||
#### Renamed `exceedLength` option of `ol.style.Text` to `overflow`
|
#### Renamed `exceedLength` option of `ol.style.Text` to `overflow`
|
||||||
|
|||||||
10
css/ol.css
10
css/ol.css
@@ -179,9 +179,6 @@
|
|||||||
.ol-attribution.ol-collapsed ul {
|
.ol-attribution.ol-collapsed ul {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.ol-attribution.ol-logo-only ul {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.ol-attribution:not(.ol-collapsed) {
|
.ol-attribution:not(.ol-collapsed) {
|
||||||
background: rgba(255,255,255,0.8);
|
background: rgba(255,255,255,0.8);
|
||||||
}
|
}
|
||||||
@@ -192,17 +189,10 @@
|
|||||||
height: 1.1em;
|
height: 1.1em;
|
||||||
line-height: 1em;
|
line-height: 1em;
|
||||||
}
|
}
|
||||||
.ol-attribution.ol-logo-only {
|
|
||||||
background: transparent;
|
|
||||||
bottom: .4em;
|
|
||||||
height: 1.1em;
|
|
||||||
line-height: 1em;
|
|
||||||
}
|
|
||||||
.ol-attribution.ol-uncollapsible img {
|
.ol-attribution.ol-uncollapsible img {
|
||||||
margin-top: -.2em;
|
margin-top: -.2em;
|
||||||
max-height: 1.6em;
|
max-height: 1.6em;
|
||||||
}
|
}
|
||||||
.ol-attribution.ol-logo-only button,
|
|
||||||
.ol-attribution.ol-uncollapsible button {
|
.ol-attribution.ol-uncollapsible button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,14 +165,6 @@ Expected an `ol.style.Style` or an array of `ol.style.Style`.
|
|||||||
|
|
||||||
Expected `layers` to be an array or an `ol.Collection`.
|
Expected `layers` to be an array or an `ol.Collection`.
|
||||||
|
|
||||||
### 44
|
|
||||||
|
|
||||||
`logo.href` should be a string.
|
|
||||||
|
|
||||||
### 45
|
|
||||||
|
|
||||||
`logo.src` should be a string.
|
|
||||||
|
|
||||||
### 46
|
### 46
|
||||||
|
|
||||||
Incorrect format for `renderer` option.
|
Incorrect format for `renderer` option.
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
---
|
|
||||||
layout: example.html
|
|
||||||
title: Custom Icon
|
|
||||||
shortdesc: Example using a custom attribution icon object
|
|
||||||
docs: >
|
|
||||||
This example creates a custom element for the attribution icon
|
|
||||||
tags: "icon, element"
|
|
||||||
---
|
|
||||||
<div id="map" class="map"><div id="popup"></div></div>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import _ol_Map_ from '../src/ol/Map.js';
|
|
||||||
import _ol_View_ from '../src/ol/View.js';
|
|
||||||
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
|
|
||||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
|
||||||
|
|
||||||
var logoElement = document.createElement('a');
|
|
||||||
logoElement.href = 'https://www.osgeo.org/';
|
|
||||||
logoElement.target = '_blank';
|
|
||||||
|
|
||||||
var logoImage = document.createElement('img');
|
|
||||||
logoImage.src = 'https://www.osgeo.org/sites/all/themes/osgeo/logo.png';
|
|
||||||
|
|
||||||
logoElement.appendChild(logoImage);
|
|
||||||
|
|
||||||
var map = new _ol_Map_({
|
|
||||||
layers: [
|
|
||||||
new _ol_layer_Tile_({
|
|
||||||
source: new _ol_source_OSM_()
|
|
||||||
})
|
|
||||||
],
|
|
||||||
target: 'map',
|
|
||||||
view: new _ol_View_({
|
|
||||||
center: [0, 0],
|
|
||||||
zoom: 2
|
|
||||||
}),
|
|
||||||
logo: logoElement
|
|
||||||
});
|
|
||||||
@@ -95,7 +95,6 @@ source.on('imageloaderror', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var map = new _ol_Map_({
|
var map = new _ol_Map_({
|
||||||
logo: false,
|
|
||||||
layers: [
|
layers: [
|
||||||
new _ol_layer_Image_({source: source})
|
new _ol_layer_Image_({source: source})
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ source.on('tileloaderror', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var map = new _ol_Map_({
|
var map = new _ol_Map_({
|
||||||
logo: false,
|
|
||||||
layers: [
|
layers: [
|
||||||
new _ol_layer_Tile_({source: source})
|
new _ol_layer_Tile_({source: source})
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +27,6 @@ BingMapsCoverageArea.prototype.zoomMax;
|
|||||||
BingMapsCoverageArea.prototype.zoomMin;
|
BingMapsCoverageArea.prototype.zoomMin;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
@@ -47,7 +45,6 @@ BingMapsImageryProvider.prototype.attribution;
|
|||||||
BingMapsImageryProvider.prototype.coverageAreas;
|
BingMapsImageryProvider.prototype.coverageAreas;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
@@ -60,12 +57,6 @@ var BingMapsImageryMetadataResponse = function() {};
|
|||||||
BingMapsImageryMetadataResponse.prototype.authenticationResultCode;
|
BingMapsImageryMetadataResponse.prototype.authenticationResultCode;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
BingMapsImageryMetadataResponse.prototype.brandLogoUri;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {string}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
@@ -96,7 +87,6 @@ BingMapsImageryMetadataResponse.prototype.statusDescription;
|
|||||||
BingMapsImageryMetadataResponse.prototype.traceId;
|
BingMapsImageryMetadataResponse.prototype.traceId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
@@ -157,7 +147,6 @@ BingMapsResource.prototype.zoomMax;
|
|||||||
BingMapsResource.prototype.zoomMin;
|
BingMapsResource.prototype.zoomMin;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
|
|||||||
150
externs/olx.js
150
externs/olx.js
@@ -5,29 +5,6 @@
|
|||||||
var olx;
|
var olx;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Object literal with config options for the map logo.
|
|
||||||
* @typedef {{href: (string), src: (string)}}
|
|
||||||
*/
|
|
||||||
olx.LogoOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Link url for the logo. Will be followed when the logo is clicked.
|
|
||||||
* @type {string}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.LogoOptions.prototype.href;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Image src for the logo.
|
|
||||||
* @type {string}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.LogoOptions.prototype.src;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options for tile constructors.
|
* Options for tile constructors.
|
||||||
* @typedef {{transition: (number|undefined)}}
|
* @typedef {{transition: (number|undefined)}}
|
||||||
@@ -4177,7 +4154,6 @@ olx.source.BingMapsOptions.prototype.transition;
|
|||||||
* extent: (ol.Extent|undefined),
|
* extent: (ol.Extent|undefined),
|
||||||
* format: (ol.format.Feature|undefined),
|
* format: (ol.format.Feature|undefined),
|
||||||
* geometryFunction: (undefined|function(ol.Feature):ol.geom.Point),
|
* geometryFunction: (undefined|function(ol.Feature):ol.geom.Point),
|
||||||
* logo: (string|undefined),
|
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* source: ol.source.Vector,
|
* source: ol.source.Vector,
|
||||||
* wrapX: (boolean|undefined)}}
|
* wrapX: (boolean|undefined)}}
|
||||||
@@ -4236,14 +4212,6 @@ olx.source.ClusterOptions.prototype.geometryFunction;
|
|||||||
olx.source.ClusterOptions.prototype.format;
|
olx.source.ClusterOptions.prototype.format;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ClusterOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projection.
|
* Projection.
|
||||||
* @type {ol.ProjectionLike}
|
* @type {ol.ProjectionLike}
|
||||||
@@ -4321,7 +4289,6 @@ olx.source.TileUTFGridOptions.prototype.url;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* opaque: (boolean|undefined),
|
* opaque: (boolean|undefined),
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* reprojectionErrorThreshold: (number|undefined),
|
* reprojectionErrorThreshold: (number|undefined),
|
||||||
@@ -4369,14 +4336,6 @@ olx.source.TileImageOptions.prototype.cacheSize;
|
|||||||
olx.source.TileImageOptions.prototype.crossOrigin;
|
olx.source.TileImageOptions.prototype.crossOrigin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.TileImageOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the layer is opaque.
|
* Whether the layer is opaque.
|
||||||
* @type {boolean|undefined}
|
* @type {boolean|undefined}
|
||||||
@@ -4502,7 +4461,6 @@ olx.source.TileImageOptions.prototype.transition;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* format: (ol.format.Feature|undefined),
|
* format: (ol.format.Feature|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* overlaps: (boolean|undefined),
|
* overlaps: (boolean|undefined),
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* state: (ol.source.State|undefined),
|
* state: (ol.source.State|undefined),
|
||||||
@@ -4545,14 +4503,6 @@ olx.source.VectorTileOptions.prototype.cacheSize;
|
|||||||
olx.source.VectorTileOptions.prototype.format;
|
olx.source.VectorTileOptions.prototype.format;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.VectorTileOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This source may have overlapping geometries. Default is `true`. Setting this
|
* This source may have overlapping geometries. Default is `true`. Setting this
|
||||||
* to `false` (e.g. for sources with polygons that represent administrative
|
* to `false` (e.g. for sources with polygons that represent administrative
|
||||||
@@ -4953,7 +4903,6 @@ olx.source.OSMOptions.prototype.wrapX;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* hidpi: (boolean|undefined),
|
* hidpi: (boolean|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
||||||
* params: Object.<string,*>,
|
* params: Object.<string,*>,
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
@@ -4993,14 +4942,6 @@ olx.source.ImageArcGISRestOptions.prototype.crossOrigin;
|
|||||||
olx.source.ImageArcGISRestOptions.prototype.hidpi;
|
olx.source.ImageArcGISRestOptions.prototype.hidpi;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageArcGISRestOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional function to load an image given a URL.
|
* Optional function to load an image given a URL.
|
||||||
* @type {ol.ImageLoadFunctionType|undefined}
|
* @type {ol.ImageLoadFunctionType|undefined}
|
||||||
@@ -5060,7 +5001,6 @@ olx.source.ImageArcGISRestOptions.prototype.url;
|
|||||||
/**
|
/**
|
||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* canvasFunction: ol.CanvasFunctionType,
|
* canvasFunction: ol.CanvasFunctionType,
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* ratio: (number|undefined),
|
* ratio: (number|undefined),
|
||||||
* resolutions: (Array.<number>|undefined),
|
* resolutions: (Array.<number>|undefined),
|
||||||
@@ -5092,14 +5032,6 @@ olx.source.ImageCanvasOptions.prototype.attributions;
|
|||||||
olx.source.ImageCanvasOptions.prototype.canvasFunction;
|
olx.source.ImageCanvasOptions.prototype.canvasFunction;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageCanvasOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projection.
|
* Projection.
|
||||||
* @type {ol.ProjectionLike}
|
* @type {ol.ProjectionLike}
|
||||||
@@ -5199,7 +5131,6 @@ olx.source.RasterOptions.prototype.operationType;
|
|||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* hidpi: (boolean|undefined),
|
* hidpi: (boolean|undefined),
|
||||||
* serverType: (ol.source.WMSServerType|string|undefined),
|
* serverType: (ol.source.WMSServerType|string|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
||||||
* params: Object.<string,*>,
|
* params: Object.<string,*>,
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
@@ -5256,14 +5187,6 @@ olx.source.ImageWMSOptions.prototype.serverType;
|
|||||||
olx.source.ImageWMSOptions.prototype.imageLoadFunction;
|
olx.source.ImageWMSOptions.prototype.imageLoadFunction;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageWMSOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WMS request parameters. At least a `LAYERS` param is required. `STYLES` is
|
* WMS request parameters. At least a `LAYERS` param is required. `STYLES` is
|
||||||
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
|
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
|
||||||
@@ -5407,7 +5330,6 @@ olx.source.StamenOptions.prototype.wrapX;
|
|||||||
* imageExtent: (ol.Extent),
|
* imageExtent: (ol.Extent),
|
||||||
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
* imageLoadFunction: (ol.ImageLoadFunctionType|undefined),
|
||||||
* imageSize: (ol.Size|undefined),
|
* imageSize: (ol.Size|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* url: string}}
|
* url: string}}
|
||||||
*/
|
*/
|
||||||
@@ -5451,14 +5373,6 @@ olx.source.ImageStaticOptions.prototype.imageExtent;
|
|||||||
olx.source.ImageStaticOptions.prototype.imageLoadFunction;
|
olx.source.ImageStaticOptions.prototype.imageLoadFunction;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optional logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ImageStaticOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projection.
|
* Projection.
|
||||||
* @type {ol.ProjectionLike}
|
* @type {ol.ProjectionLike}
|
||||||
@@ -5489,7 +5403,6 @@ olx.source.ImageStaticOptions.prototype.url;
|
|||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* params: (Object.<string, *>|undefined),
|
* params: (Object.<string, *>|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* tileGrid: (ol.tilegrid.TileGrid|undefined),
|
* tileGrid: (ol.tilegrid.TileGrid|undefined),
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* reprojectionErrorThreshold: (number|undefined),
|
* reprojectionErrorThreshold: (number|undefined),
|
||||||
@@ -5544,14 +5457,6 @@ olx.source.TileArcGISRestOptions.prototype.crossOrigin;
|
|||||||
olx.source.TileArcGISRestOptions.prototype.params;
|
olx.source.TileArcGISRestOptions.prototype.params;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.TileArcGISRestOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tile grid. Base this on the resolutions, tilesize and extent supported by the
|
* Tile grid. Base this on the resolutions, tilesize and extent supported by the
|
||||||
* server.
|
* server.
|
||||||
@@ -5746,7 +5651,6 @@ olx.source.TileJSONOptions.prototype.transition;
|
|||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* gutter: (number|undefined),
|
* gutter: (number|undefined),
|
||||||
* hidpi: (boolean|undefined),
|
* hidpi: (boolean|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
|
* tileClass: (function(new: ol.ImageTile, ol.TileCoord,
|
||||||
* ol.TileState, string, ?string,
|
* ol.TileState, string, ?string,
|
||||||
* ol.TileLoadFunctionType)|undefined),
|
* ol.TileLoadFunctionType)|undefined),
|
||||||
@@ -5825,14 +5729,6 @@ olx.source.TileWMSOptions.prototype.gutter;
|
|||||||
olx.source.TileWMSOptions.prototype.hidpi;
|
olx.source.TileWMSOptions.prototype.hidpi;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.TileWMSOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class used to instantiate image tiles. Default is {@link ol.ImageTile}.
|
* Class used to instantiate image tiles. Default is {@link ol.ImageTile}.
|
||||||
* @type {function(new: ol.ImageTile, ol.TileCoord,
|
* @type {function(new: ol.ImageTile, ol.TileCoord,
|
||||||
@@ -5936,7 +5832,6 @@ olx.source.TileWMSOptions.prototype.transition;
|
|||||||
* features: (Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined),
|
* features: (Array.<ol.Feature>|ol.Collection.<ol.Feature>|undefined),
|
||||||
* format: (ol.format.Feature|undefined),
|
* format: (ol.format.Feature|undefined),
|
||||||
* loader: (ol.FeatureLoader|undefined),
|
* loader: (ol.FeatureLoader|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* overlaps: (boolean|undefined),
|
* overlaps: (boolean|undefined),
|
||||||
* strategy: (ol.LoadingStrategy|undefined),
|
* strategy: (ol.LoadingStrategy|undefined),
|
||||||
* url: (string|ol.FeatureUrlFunction|undefined),
|
* url: (string|ol.FeatureUrlFunction|undefined),
|
||||||
@@ -6013,14 +5908,6 @@ olx.source.VectorOptions.prototype.format;
|
|||||||
olx.source.VectorOptions.prototype.loader;
|
olx.source.VectorOptions.prototype.loader;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.VectorOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This source may have overlapping geometries. Default is `true`. Setting this
|
* This source may have overlapping geometries. Default is `true`. Setting this
|
||||||
* to `false` (e.g. for sources with polygons that represent administrative
|
* to `false` (e.g. for sources with polygons that represent administrative
|
||||||
@@ -6099,7 +5986,6 @@ olx.source.VectorOptions.prototype.wrapX;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* crossOrigin: (string|null|undefined),
|
* crossOrigin: (string|null|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* tileGrid: ol.tilegrid.WMTS,
|
* tileGrid: ol.tilegrid.WMTS,
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* reprojectionErrorThreshold: (number|undefined),
|
* reprojectionErrorThreshold: (number|undefined),
|
||||||
@@ -6151,14 +6037,6 @@ olx.source.WMTSOptions.prototype.cacheSize;
|
|||||||
olx.source.WMTSOptions.prototype.crossOrigin;
|
olx.source.WMTSOptions.prototype.crossOrigin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.WMTSOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tile grid.
|
* Tile grid.
|
||||||
* @type {ol.tilegrid.WMTS}
|
* @type {ol.tilegrid.WMTS}
|
||||||
@@ -6315,7 +6193,6 @@ olx.source.WMTSOptions.prototype.transition;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* opaque: (boolean|undefined),
|
* opaque: (boolean|undefined),
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* reprojectionErrorThreshold: (number|undefined),
|
* reprojectionErrorThreshold: (number|undefined),
|
||||||
@@ -6362,14 +6239,6 @@ olx.source.XYZOptions.prototype.cacheSize;
|
|||||||
olx.source.XYZOptions.prototype.crossOrigin;
|
olx.source.XYZOptions.prototype.crossOrigin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.XYZOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the layer is opaque.
|
* Whether the layer is opaque.
|
||||||
* @type {boolean|undefined}
|
* @type {boolean|undefined}
|
||||||
@@ -6499,7 +6368,6 @@ olx.source.XYZOptions.prototype.transition;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* maxZoom: (number|undefined),
|
* maxZoom: (number|undefined),
|
||||||
* minZoom: (number|undefined),
|
* minZoom: (number|undefined),
|
||||||
@@ -6539,14 +6407,6 @@ olx.source.CartoDBOptions.prototype.cacheSize;
|
|||||||
olx.source.CartoDBOptions.prototype.crossOrigin;
|
olx.source.CartoDBOptions.prototype.crossOrigin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.CartoDBOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projection. Default is `EPSG:3857`.
|
* Projection. Default is `EPSG:3857`.
|
||||||
* @type {ol.ProjectionLike}
|
* @type {ol.ProjectionLike}
|
||||||
@@ -6614,7 +6474,6 @@ olx.source.CartoDBOptions.prototype.account;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* crossOrigin: (null|string|undefined),
|
* crossOrigin: (null|string|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* projection: (ol.ProjectionLike|undefined),
|
* projection: (ol.ProjectionLike|undefined),
|
||||||
* reprojectionErrorThreshold: (number|undefined),
|
* reprojectionErrorThreshold: (number|undefined),
|
||||||
* url: !string,
|
* url: !string,
|
||||||
@@ -6655,14 +6514,6 @@ olx.source.ZoomifyOptions.prototype.cacheSize;
|
|||||||
olx.source.ZoomifyOptions.prototype.crossOrigin;
|
olx.source.ZoomifyOptions.prototype.crossOrigin;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Logo.
|
|
||||||
* @type {string|olx.LogoOptions|undefined}
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
olx.source.ZoomifyOptions.prototype.logo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projection.
|
* Projection.
|
||||||
* @type {ol.ProjectionLike|undefined}
|
* @type {ol.ProjectionLike|undefined}
|
||||||
@@ -7798,7 +7649,6 @@ olx.view.FitOptions.prototype.callback;
|
|||||||
* index: number,
|
* index: number,
|
||||||
* layerStates: Object.<number, ol.LayerState>,
|
* layerStates: Object.<number, ol.LayerState>,
|
||||||
* layerStatesArray: Array.<ol.LayerState>,
|
* layerStatesArray: Array.<ol.LayerState>,
|
||||||
* logos: Object.<string, (string|Element)>,
|
|
||||||
* pixelRatio: number,
|
* pixelRatio: number,
|
||||||
* pixelToCoordinateTransform: ol.Transform,
|
* pixelToCoordinateTransform: ol.Transform,
|
||||||
* postRenderFunctions: Array.<ol.PostRenderFunction>,
|
* postRenderFunctions: Array.<ol.PostRenderFunction>,
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEm
|
|||||||
import {TRUE} from './functions.js';
|
import {TRUE} from './functions.js';
|
||||||
import _ol_has_ from './has.js';
|
import _ol_has_ from './has.js';
|
||||||
import _ol_layer_Group_ from './layer/Group.js';
|
import _ol_layer_Group_ from './layer/Group.js';
|
||||||
import _ol_obj_ from './obj.js';
|
|
||||||
import _ol_plugins_ from './plugins.js';
|
import _ol_plugins_ from './plugins.js';
|
||||||
import _ol_renderer_Type_ from './renderer/Type.js';
|
import _ol_renderer_Type_ from './renderer/Type.js';
|
||||||
import _ol_size_ from './size.js';
|
import _ol_size_ from './size.js';
|
||||||
@@ -41,7 +40,6 @@ import _ol_transform_ from './transform.js';
|
|||||||
* layers: (Array.<ol.layer.Base>|ol.Collection.<ol.layer.Base>|undefined),
|
* layers: (Array.<ol.layer.Base>|ol.Collection.<ol.layer.Base>|undefined),
|
||||||
* loadTilesWhileAnimating: (boolean|undefined),
|
* loadTilesWhileAnimating: (boolean|undefined),
|
||||||
* loadTilesWhileInteracting: (boolean|undefined),
|
* loadTilesWhileInteracting: (boolean|undefined),
|
||||||
* logo: (boolean|string|olx.LogoOptions|Element|undefined),
|
|
||||||
* moveTolerance: (number|undefined),
|
* moveTolerance: (number|undefined),
|
||||||
* overlays: (ol.Collection.<ol.Overlay>|Array.<ol.Overlay>|undefined),
|
* overlays: (ol.Collection.<ol.Overlay>|Array.<ol.Overlay>|undefined),
|
||||||
* renderer: (ol.renderer.Type|Array.<ol.renderer.Type>|undefined),
|
* renderer: (ol.renderer.Type|Array.<ol.renderer.Type>|undefined),
|
||||||
@@ -86,13 +84,6 @@ export var MapOptions;
|
|||||||
* true, tiles will be loaded while interacting with the map. This may
|
* true, tiles will be loaded while interacting with the map. This may
|
||||||
* improve the user experience, but can also make map panning and zooming
|
* improve the user experience, but can also make map panning and zooming
|
||||||
* choppy on devices with slow memory. Default is `false`.
|
* choppy on devices with slow memory. Default is `false`.
|
||||||
* @param {boolean|string|olx.LogoOptions|Element|undefined} options.logo The
|
|
||||||
* map logo. A logo to be displayed on the map at all times. If a string is
|
|
||||||
* provided, it will be set as the image source of the logo. If an object is
|
|
||||||
* provided, the `src` property should be the URL for an image and the
|
|
||||||
* `href` property should be a URL for creating a link. If an element is
|
|
||||||
* provided, the element will be used. To disable the map logo, set the
|
|
||||||
* option to `false`. By default, the OpenLayers logo is shown.
|
|
||||||
* @param {number|undefined} options.moveTolerance The minimum distance in
|
* @param {number|undefined} options.moveTolerance The minimum distance in
|
||||||
* pixels the cursor must move to be detected as a map move event instead
|
* pixels the cursor must move to be detected as a map move event instead
|
||||||
* of a click. Increasing this value can make it easier to click on the map.
|
* of a click. Increasing this value can make it easier to click on the map.
|
||||||
@@ -147,12 +138,6 @@ var _ol_PluggableMap_ = function(options) {
|
|||||||
this.pixelRatio_ = options.pixelRatio !== undefined ?
|
this.pixelRatio_ = options.pixelRatio !== undefined ?
|
||||||
options.pixelRatio : _ol_has_.DEVICE_PIXEL_RATIO;
|
options.pixelRatio : _ol_has_.DEVICE_PIXEL_RATIO;
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
* @type {Object.<string, string>}
|
|
||||||
*/
|
|
||||||
this.logos_ = optionsInternal.logos;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
@@ -1234,7 +1219,6 @@ _ol_PluggableMap_.prototype.renderFrame_ = function(time) {
|
|||||||
index: this.frameIndex_++,
|
index: this.frameIndex_++,
|
||||||
layerStates: layerStates,
|
layerStates: layerStates,
|
||||||
layerStatesArray: layerStatesArray,
|
layerStatesArray: layerStatesArray,
|
||||||
logos: _ol_obj_.assign({}, this.logos_),
|
|
||||||
pixelRatio: this.pixelRatio_,
|
pixelRatio: this.pixelRatio_,
|
||||||
pixelToCoordinateTransform: this.pixelToCoordinateTransform_,
|
pixelToCoordinateTransform: this.pixelToCoordinateTransform_,
|
||||||
postRenderFunctions: [],
|
postRenderFunctions: [],
|
||||||
@@ -1399,34 +1383,6 @@ _ol_PluggableMap_.DEFAULT_RENDERER_TYPES = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @const
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
_ol_PluggableMap_.LOGO_URL = 'data:image/png;base64,' +
|
|
||||||
'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBI' +
|
|
||||||
'WXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAA' +
|
|
||||||
'AhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszW' +
|
|
||||||
'WMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvY' +
|
|
||||||
'asvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvX' +
|
|
||||||
'H1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1Vk' +
|
|
||||||
'bMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW' +
|
|
||||||
'2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLP' +
|
|
||||||
'VcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqT' +
|
|
||||||
'acrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaar' +
|
|
||||||
'ldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+Hi' +
|
|
||||||
'zeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDn' +
|
|
||||||
'BAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSF' +
|
|
||||||
'hYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJ' +
|
|
||||||
'REFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxC' +
|
|
||||||
'Brb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe' +
|
|
||||||
'0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8' +
|
|
||||||
'a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7a' +
|
|
||||||
'hgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCn' +
|
|
||||||
'B3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDg' +
|
|
||||||
'q82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC';
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {MapOptions} options Map options.
|
* @param {MapOptions} options Map options.
|
||||||
* @return {ol.MapOptionsInternal} Internal map options.
|
* @return {ol.MapOptionsInternal} Internal map options.
|
||||||
@@ -1448,23 +1404,6 @@ _ol_PluggableMap_.createOptionsInternal = function(options) {
|
|||||||
*/
|
*/
|
||||||
var values = {};
|
var values = {};
|
||||||
|
|
||||||
var logos = {};
|
|
||||||
if (options.logo === undefined ||
|
|
||||||
(typeof options.logo === 'boolean' && options.logo)) {
|
|
||||||
logos[_ol_PluggableMap_.LOGO_URL] = 'https://openlayers.org/';
|
|
||||||
} else {
|
|
||||||
var logo = options.logo;
|
|
||||||
if (typeof logo === 'string') {
|
|
||||||
logos[logo] = '';
|
|
||||||
} else if (logo instanceof HTMLElement) {
|
|
||||||
logos[getUid(logo).toString()] = logo;
|
|
||||||
} else if (logo) {
|
|
||||||
_ol_asserts_.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
|
|
||||||
_ol_asserts_.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
|
|
||||||
logos[logo.src] = logo.href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var layerGroup = (options.layers instanceof _ol_layer_Group_) ?
|
var layerGroup = (options.layers instanceof _ol_layer_Group_) ?
|
||||||
options.layers : new _ol_layer_Group_({layers: options.layers});
|
options.layers : new _ol_layer_Group_({layers: options.layers});
|
||||||
values[_ol_MapProperty_.LAYERGROUP] = layerGroup;
|
values[_ol_MapProperty_.LAYERGROUP] = layerGroup;
|
||||||
@@ -1554,7 +1493,6 @@ _ol_PluggableMap_.createOptionsInternal = function(options) {
|
|||||||
controls: controls,
|
controls: controls,
|
||||||
interactions: interactions,
|
interactions: interactions,
|
||||||
keyboardEventTarget: keyboardEventTarget,
|
keyboardEventTarget: keyboardEventTarget,
|
||||||
logos: logos,
|
|
||||||
overlays: overlays,
|
overlays: overlays,
|
||||||
mapRendererPlugin: mapRendererPlugin,
|
mapRendererPlugin: mapRendererPlugin,
|
||||||
values: values
|
values: values
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
/**
|
/**
|
||||||
* @module ol/control/Attribution
|
* @module ol/control/Attribution
|
||||||
*/
|
*/
|
||||||
// FIXME handle date line wrap
|
|
||||||
|
|
||||||
import {inherits} from '../index.js';
|
import {inherits} from '../index.js';
|
||||||
import _ol_array_ from '../array.js';
|
import _ol_array_ from '../array.js';
|
||||||
import Control from '../control/Control.js';
|
import Control from '../control/Control.js';
|
||||||
import _ol_css_ from '../css.js';
|
import _ol_css_ from '../css.js';
|
||||||
import {removeNode, replaceNode} from '../dom.js';
|
import {removeChildren, replaceNode} from '../dom.js';
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import EventType from '../events/EventType.js';
|
import EventType from '../events/EventType.js';
|
||||||
import _ol_layer_Layer_ from '../layer/Layer.js';
|
import _ol_layer_Layer_ from '../layer/Layer.js';
|
||||||
import _ol_obj_ from '../obj.js';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
@@ -35,15 +32,6 @@ var Attribution = function(opt_options) {
|
|||||||
*/
|
*/
|
||||||
this.ulElement_ = document.createElement('UL');
|
this.ulElement_ = document.createElement('UL');
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
* @type {Element}
|
|
||||||
*/
|
|
||||||
this.logoLi_ = document.createElement('LI');
|
|
||||||
|
|
||||||
this.ulElement_.appendChild(this.logoLi_);
|
|
||||||
this.logoLi_.style.display = 'none';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
@@ -131,12 +119,6 @@ var Attribution = function(opt_options) {
|
|||||||
*/
|
*/
|
||||||
this.renderedVisible_ = true;
|
this.renderedVisible_ = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
* @type {Object.<string, Element>}
|
|
||||||
*/
|
|
||||||
this.logoElements_ = {};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(Attribution, Control);
|
inherits(Attribution, Control);
|
||||||
@@ -231,10 +213,7 @@ Attribution.prototype.updateElement_ = function(frameState) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove everything but the logo
|
removeChildren(this.ulElement_);
|
||||||
while (this.ulElement_.lastChild !== this.logoLi_) {
|
|
||||||
this.ulElement_.removeChild(this.ulElement_.lastChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
// append the attributions
|
// append the attributions
|
||||||
for (var i = 0, ii = attributions.length; i < ii; ++i) {
|
for (var i = 0, ii = attributions.length; i < ii; ++i) {
|
||||||
@@ -244,64 +223,13 @@ Attribution.prototype.updateElement_ = function(frameState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (attributions.length === 0 && this.renderedAttributions_.length > 0) {
|
var visible = attributions.length > 0;
|
||||||
this.element.classList.add('ol-logo-only');
|
|
||||||
} else if (this.renderedAttributions_.length === 0 && attributions.length > 0) {
|
|
||||||
this.element.classList.remove('ol-logo-only');
|
|
||||||
}
|
|
||||||
|
|
||||||
var visible = attributions.length > 0 || !_ol_obj_.isEmpty(frameState.logos);
|
|
||||||
if (this.renderedVisible_ != visible) {
|
if (this.renderedVisible_ != visible) {
|
||||||
this.element.style.display = visible ? '' : 'none';
|
this.element.style.display = visible ? '' : 'none';
|
||||||
this.renderedVisible_ = visible;
|
this.renderedVisible_ = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.renderedAttributions_ = attributions;
|
this.renderedAttributions_ = attributions;
|
||||||
this.insertLogos_(frameState);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {?olx.FrameState} frameState Frame state.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
Attribution.prototype.insertLogos_ = function(frameState) {
|
|
||||||
|
|
||||||
var logo;
|
|
||||||
var logos = frameState.logos;
|
|
||||||
var logoElements = this.logoElements_;
|
|
||||||
|
|
||||||
for (logo in logoElements) {
|
|
||||||
if (!(logo in logos)) {
|
|
||||||
removeNode(logoElements[logo]);
|
|
||||||
delete logoElements[logo];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var image, logoElement, logoKey;
|
|
||||||
for (logoKey in logos) {
|
|
||||||
var logoValue = logos[logoKey];
|
|
||||||
if (logoValue instanceof HTMLElement) {
|
|
||||||
this.logoLi_.appendChild(logoValue);
|
|
||||||
logoElements[logoKey] = logoValue;
|
|
||||||
}
|
|
||||||
if (!(logoKey in logoElements)) {
|
|
||||||
image = new Image();
|
|
||||||
image.src = logoKey;
|
|
||||||
if (logoValue === '') {
|
|
||||||
logoElement = image;
|
|
||||||
} else {
|
|
||||||
logoElement = document.createElement('a');
|
|
||||||
logoElement.href = logoValue;
|
|
||||||
logoElement.appendChild(image);
|
|
||||||
}
|
|
||||||
this.logoLi_.appendChild(logoElement);
|
|
||||||
logoElements[logoKey] = logoElement;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.logoLi_.style.display = !_ol_obj_.isEmpty(logos) ? '' : 'none';
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import {getUid, inherits, nullFunction} from '../index.js';
|
|||||||
import _ol_ImageState_ from '../ImageState.js';
|
import _ol_ImageState_ from '../ImageState.js';
|
||||||
import _ol_Observable_ from '../Observable.js';
|
import _ol_Observable_ from '../Observable.js';
|
||||||
import _ol_TileState_ from '../TileState.js';
|
import _ol_TileState_ from '../TileState.js';
|
||||||
import _ol_asserts_ from '../asserts.js';
|
|
||||||
import _ol_events_ from '../events.js';
|
import _ol_events_ from '../events.js';
|
||||||
import EventType from '../events/EventType.js';
|
import EventType from '../events/EventType.js';
|
||||||
import {FALSE} from '../functions.js';
|
import {FALSE} from '../functions.js';
|
||||||
@@ -166,25 +165,6 @@ _ol_renderer_Layer_.prototype.scheduleExpireCache = function(frameState, tileSou
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {olx.FrameState} frameState Frame state.
|
|
||||||
* @param {ol.source.Source} source Source.
|
|
||||||
* @protected
|
|
||||||
*/
|
|
||||||
_ol_renderer_Layer_.prototype.updateLogos = function(frameState, source) {
|
|
||||||
var logo = source.getLogo();
|
|
||||||
if (logo !== undefined) {
|
|
||||||
if (typeof logo === 'string') {
|
|
||||||
frameState.logos[logo] = '';
|
|
||||||
} else if (logo) {
|
|
||||||
_ol_asserts_.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
|
|
||||||
_ol_asserts_.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
|
|
||||||
frameState.logos[logo.src] = logo.href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.
|
* @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.
|
||||||
* @param {ol.source.Tile} tileSource Tile source.
|
* @param {ol.source.Tile} tileSource Tile source.
|
||||||
|
|||||||
@@ -187,7 +187,6 @@ _ol_renderer_canvas_ImageLayer_.prototype.prepareFrame = function(frameState, la
|
|||||||
0,
|
0,
|
||||||
-viewCenter[0], -viewCenter[1]);
|
-viewCenter[0], -viewCenter[1]);
|
||||||
|
|
||||||
this.updateLogos(frameState, imageSource);
|
|
||||||
this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio;
|
this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -292,7 +292,6 @@ _ol_renderer_canvas_TileLayer_.prototype.prepareFrame = function(frameState, lay
|
|||||||
this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,
|
this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,
|
||||||
projection, extent, z, tileLayer.getPreload());
|
projection, extent, z, tileLayer.getPreload());
|
||||||
this.scheduleExpireCache(frameState, tileSource);
|
this.scheduleExpireCache(frameState, tileSource);
|
||||||
this.updateLogos(frameState, tileSource);
|
|
||||||
|
|
||||||
return this.renderedTiles.length > 0;
|
return this.renderedTiles.length > 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -299,12 +299,9 @@ _ol_renderer_canvas_VectorLayer_.prototype.handleStyleImageChange_ = function(ev
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_renderer_canvas_VectorLayer_.prototype.prepareFrame = function(frameState, layerState) {
|
_ol_renderer_canvas_VectorLayer_.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
|
|
||||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||||
var vectorSource = vectorLayer.getSource();
|
var vectorSource = vectorLayer.getSource();
|
||||||
|
|
||||||
this.updateLogos(frameState, vectorSource);
|
|
||||||
|
|
||||||
var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING];
|
var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING];
|
||||||
var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING];
|
var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING];
|
||||||
var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
|
var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
|
||||||
|
|||||||
@@ -189,8 +189,6 @@ _ol_renderer_webgl_ImageLayer_.prototype.prepareFrame = function(frameState, lay
|
|||||||
|
|
||||||
this.image_ = image;
|
this.image_ = image;
|
||||||
this.texture = texture;
|
this.texture = texture;
|
||||||
|
|
||||||
this.updateLogos(frameState, imageSource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return !!image;
|
return !!image;
|
||||||
|
|||||||
@@ -354,7 +354,6 @@ _ol_renderer_webgl_TileLayer_.prototype.prepareFrame = function(frameState, laye
|
|||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
this.scheduleExpireCache(frameState, tileSource);
|
this.scheduleExpireCache(frameState, tileSource);
|
||||||
this.updateLogos(frameState, tileSource);
|
|
||||||
|
|
||||||
var texCoordMatrix = this.texCoordMatrix;
|
var texCoordMatrix = this.texCoordMatrix;
|
||||||
_ol_transform_.reset(texCoordMatrix);
|
_ol_transform_.reset(texCoordMatrix);
|
||||||
|
|||||||
@@ -212,12 +212,9 @@ _ol_renderer_webgl_VectorLayer_.prototype.handleStyleImageChange_ = function(eve
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_renderer_webgl_VectorLayer_.prototype.prepareFrame = function(frameState, layerState, context) {
|
_ol_renderer_webgl_VectorLayer_.prototype.prepareFrame = function(frameState, layerState, context) {
|
||||||
|
|
||||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||||
var vectorSource = vectorLayer.getSource();
|
var vectorSource = vectorLayer.getSource();
|
||||||
|
|
||||||
this.updateLogos(frameState, vectorSource);
|
|
||||||
|
|
||||||
var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING];
|
var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING];
|
||||||
var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING];
|
var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING];
|
||||||
var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
|
var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
|
||||||
|
|||||||
@@ -125,11 +125,6 @@ _ol_source_BingMaps_.prototype.handleImageryMetadataResponse = function(response
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var brandLogoUri = response.brandLogoUri;
|
|
||||||
if (brandLogoUri.indexOf('https') == -1) {
|
|
||||||
brandLogoUri = brandLogoUri.replace('http', 'https');
|
|
||||||
}
|
|
||||||
//var copyright = response.copyright; // FIXME do we need to display this?
|
|
||||||
var resource = response.resourceSets[0].resources[0];
|
var resource = response.resourceSets[0].resources[0];
|
||||||
var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;
|
var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;
|
||||||
|
|
||||||
@@ -209,8 +204,6 @@ _ol_source_BingMaps_.prototype.handleImageryMetadataResponse = function(response
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setLogo(brandLogoUri);
|
|
||||||
|
|
||||||
this.setState(_ol_source_State_.READY);
|
this.setState(_ol_source_State_.READY);
|
||||||
};
|
};
|
||||||
export default _ol_source_BingMaps_;
|
export default _ol_source_BingMaps_;
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ var _ol_source_CartoDB_ = function(options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
logo: options.logo,
|
|
||||||
maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,
|
maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,
|
||||||
minZoom: options.minZoom,
|
minZoom: options.minZoom,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ var _ol_source_Cluster_ = function(options) {
|
|||||||
_ol_source_Vector_.call(this, {
|
_ol_source_Vector_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
wrapX: options.wrapX
|
wrapX: options.wrapX
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ var _ol_source_Image_ = function(options) {
|
|||||||
_ol_source_Source_.call(this, {
|
_ol_source_Source_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
state: options.state
|
state: options.state
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ var _ol_source_ImageArcGISRest_ = function(opt_options) {
|
|||||||
|
|
||||||
_ol_source_Image_.call(this, {
|
_ol_source_Image_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
resolutions: options.resolutions
|
resolutions: options.resolutions
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ var _ol_source_ImageCanvas_ = function(options) {
|
|||||||
|
|
||||||
_ol_source_Image_.call(this, {
|
_ol_source_Image_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
resolutions: options.resolutions,
|
resolutions: options.resolutions,
|
||||||
state: options.state
|
state: options.state
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ var _ol_source_ImageStatic_ = function(options) {
|
|||||||
|
|
||||||
_ol_source_Image_.call(this, {
|
_ol_source_Image_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
logo: options.logo,
|
|
||||||
projection: getProjection(options.projection)
|
projection: getProjection(options.projection)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ var _ol_source_ImageWMS_ = function(opt_options) {
|
|||||||
|
|
||||||
_ol_source_Image_.call(this, {
|
_ol_source_Image_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
resolutions: options.resolutions
|
resolutions: options.resolutions
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ var _ol_source_Raster_ = function(options) {
|
|||||||
index: 0,
|
index: 0,
|
||||||
layerStates: layerStates,
|
layerStates: layerStates,
|
||||||
layerStatesArray: layerStatesArray,
|
layerStatesArray: layerStatesArray,
|
||||||
logos: {},
|
|
||||||
pixelRatio: 1,
|
pixelRatio: 1,
|
||||||
pixelToCoordinateTransform: _ol_transform_.create(),
|
pixelToCoordinateTransform: _ol_transform_.create(),
|
||||||
postRenderFunctions: [],
|
postRenderFunctions: [],
|
||||||
|
|||||||
@@ -7,13 +7,6 @@ import {get as getProjection} from '../proj.js';
|
|||||||
import _ol_source_State_ from '../source/State.js';
|
import _ol_source_State_ from '../source/State.js';
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Object literal with config options for the map logo.
|
|
||||||
* @typedef {{href: (string), src: (string)}}
|
|
||||||
*/
|
|
||||||
export var LogoOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -44,12 +37,6 @@ var _ol_source_Source_ = function(options) {
|
|||||||
*/
|
*/
|
||||||
this.attributions_ = this.adaptAttributions_(options.attributions);
|
this.attributions_ = this.adaptAttributions_(options.attributions);
|
||||||
|
|
||||||
/**
|
|
||||||
* @private
|
|
||||||
* @type {string|LogoOptions|undefined}
|
|
||||||
*/
|
|
||||||
this.logo_ = options.logo;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.source.State}
|
* @type {ol.source.State}
|
||||||
@@ -114,16 +101,6 @@ _ol_source_Source_.prototype.getAttributions = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the logo of the source.
|
|
||||||
* @return {string|LogoOptions|undefined} Logo.
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
_ol_source_Source_.prototype.getLogo = function() {
|
|
||||||
return this.logo_;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the projection of the source.
|
* Get the projection of the source.
|
||||||
* @return {ol.proj.Projection} Projection.
|
* @return {ol.proj.Projection} Projection.
|
||||||
@@ -181,15 +158,6 @@ _ol_source_Source_.prototype.setAttributions = function(attributions) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the logo of the source.
|
|
||||||
* @param {string|LogoOptions|undefined} logo Logo.
|
|
||||||
*/
|
|
||||||
_ol_source_Source_.prototype.setLogo = function(logo) {
|
|
||||||
this.logo_ = logo;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the state of the source.
|
* Set the state of the source.
|
||||||
* @param {ol.source.State} state State.
|
* @param {ol.source.State} state State.
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ var _ol_source_Tile_ = function(options) {
|
|||||||
_ol_source_Source_.call(this, {
|
_ol_source_Source_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
state: options.state,
|
state: options.state,
|
||||||
wrapX: options.wrapX
|
wrapX: options.wrapX
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ var _ol_source_TileArcGISRest_ = function(opt_options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
tileGrid: options.tileGrid,
|
tileGrid: options.tileGrid,
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ var _ol_source_TileImage_ = function(options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
logo: options.logo,
|
|
||||||
opaque: options.opaque,
|
opaque: options.opaque,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
state: options.state,
|
state: options.state,
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ var _ol_source_TileWMS_ = function(opt_options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
logo: options.logo,
|
|
||||||
opaque: !transparent,
|
opaque: !transparent,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ var _ol_source_UrlTile_ = function(options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
logo: options.logo,
|
|
||||||
opaque: options.opaque,
|
opaque: options.opaque,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
state: options.state,
|
state: options.state,
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ var _ol_source_Vector_ = function(opt_options) {
|
|||||||
|
|
||||||
_ol_source_Source_.call(this, {
|
_ol_source_Source_.call(this, {
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
logo: options.logo,
|
|
||||||
projection: undefined,
|
projection: undefined,
|
||||||
state: _ol_source_State_.READY,
|
state: _ol_source_State_.READY,
|
||||||
wrapX: options.wrapX !== undefined ? options.wrapX : true
|
wrapX: options.wrapX !== undefined ? options.wrapX : true
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ var _ol_source_VectorTile_ = function(options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128,
|
cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128,
|
||||||
extent: extent,
|
extent: extent,
|
||||||
logo: options.logo,
|
|
||||||
opaque: false,
|
opaque: false,
|
||||||
projection: projection,
|
projection: projection,
|
||||||
state: options.state,
|
state: options.state,
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ var _ol_source_WMTS_ = function(options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
tileClass: options.tileClass,
|
tileClass: options.tileClass,
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ var _ol_source_XYZ_ = function(opt_options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
logo: options.logo,
|
|
||||||
opaque: options.opaque,
|
opaque: options.opaque,
|
||||||
projection: projection,
|
projection: projection,
|
||||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
|
|||||||
@@ -141,7 +141,6 @@ var _ol_source_Zoomify_ = function(opt_options) {
|
|||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
logo: options.logo,
|
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||||
tileClass: ZoomifyTileClass,
|
tileClass: ZoomifyTileClass,
|
||||||
|
|||||||
@@ -440,7 +440,6 @@ ol.LRUCacheEntry;
|
|||||||
* @typedef {{controls: (ol.Collection.<ol.control.Control>|undefined),
|
* @typedef {{controls: (ol.Collection.<ol.control.Control>|undefined),
|
||||||
* interactions: (ol.Collection.<ol.interaction.Interaction>|undefined),
|
* interactions: (ol.Collection.<ol.interaction.Interaction>|undefined),
|
||||||
* keyboardEventTarget: (Element|Document),
|
* keyboardEventTarget: (Element|Document),
|
||||||
* logos: (Object.<string, (string|Element)>),
|
|
||||||
* overlays: ol.Collection.<ol.Overlay>,
|
* overlays: ol.Collection.<ol.Overlay>,
|
||||||
* mapRendererPlugin: olx.MapRendererPlugin,
|
* mapRendererPlugin: olx.MapRendererPlugin,
|
||||||
* values: Object.<string, *>}}
|
* values: Object.<string, *>}}
|
||||||
@@ -616,7 +615,6 @@ ol.SnapSegmentDataType;
|
|||||||
/**
|
/**
|
||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* extent: (null|ol.Extent|undefined),
|
* extent: (null|ol.Extent|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* resolutions: (Array.<number>|undefined),
|
* resolutions: (Array.<number>|undefined),
|
||||||
* state: (ol.source.State|undefined)}}
|
* state: (ol.source.State|undefined)}}
|
||||||
@@ -634,7 +632,6 @@ ol.SourceRasterRenderedState;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* state: (ol.source.State|undefined),
|
* state: (ol.source.State|undefined),
|
||||||
* wrapX: (boolean|undefined)}}
|
* wrapX: (boolean|undefined)}}
|
||||||
@@ -646,7 +643,6 @@ ol.SourceSourceOptions;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* extent: (ol.Extent|undefined),
|
* extent: (ol.Extent|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* opaque: (boolean|undefined),
|
* opaque: (boolean|undefined),
|
||||||
* tilePixelRatio: (number|undefined),
|
* tilePixelRatio: (number|undefined),
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
@@ -662,7 +658,6 @@ ol.SourceTileOptions;
|
|||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* cacheSize: (number|undefined),
|
* cacheSize: (number|undefined),
|
||||||
* extent: (ol.Extent|undefined),
|
* extent: (ol.Extent|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
|
||||||
* opaque: (boolean|undefined),
|
* opaque: (boolean|undefined),
|
||||||
* projection: ol.ProjectionLike,
|
* projection: ol.ProjectionLike,
|
||||||
* state: (ol.source.State|undefined),
|
* state: (ol.source.State|undefined),
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ describe('ol.control.Attribution', function() {
|
|||||||
it('does not add duplicate attributions', function() {
|
it('does not add duplicate attributions', function() {
|
||||||
map.renderSync();
|
map.renderSync();
|
||||||
var attribution = map.getTarget().querySelectorAll('.ol-attribution li');
|
var attribution = map.getTarget().querySelectorAll('.ol-attribution li');
|
||||||
expect(attribution.length).to.be(3); // first <li> is the logo
|
expect(attribution.length).to.be(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user