Merge branch 'master' of github.com:openlayers/ol3 into wms-improvements
Conflicts: src/ol/source/tiledwmssource.js test/spec/ol/tileurlfunction.test.js
This commit is contained in:
@@ -1,7 +1 @@
|
||||
@exportSymbol ol.source.BingMaps
|
||||
@exportSymbol ol.BingMapsStyle
|
||||
@exportProperty ol.BingMapsStyle.AERIAL
|
||||
@exportProperty ol.BingMapsStyle.AERIAL_WITH_LABELS
|
||||
@exportProperty ol.BingMapsStyle.ROAD
|
||||
@exportProperty ol.BingMapsStyle.ORDNANCE_SURVEY
|
||||
@exportProperty ol.BingMapsStyle.COLLINS_BART
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
goog.provide('ol.BingMapsStyle');
|
||||
goog.provide('ol.source.BingMaps');
|
||||
|
||||
goog.require('goog.Uri');
|
||||
@@ -15,18 +14,6 @@ goog.require('ol.source.ImageTileSource');
|
||||
goog.require('ol.tilegrid.XYZ');
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
ol.BingMapsStyle = {
|
||||
AERIAL: 'Aerial',
|
||||
AERIAL_WITH_LABELS: 'AerialWithLabels',
|
||||
ROAD: 'Road',
|
||||
ORDNANCE_SURVEY: 'OrdnanceSurvey',
|
||||
COLLINS_BART: 'CollinsBart'
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
@@ -36,6 +23,7 @@ ol.BingMapsStyle = {
|
||||
ol.source.BingMaps = function(bingMapsOptions) {
|
||||
|
||||
goog.base(this, {
|
||||
opaque: true,
|
||||
projection: ol.projection.getFromCode('EPSG:3857')
|
||||
});
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ ol.source.DebugTileSource = function(options) {
|
||||
|
||||
goog.base(this, {
|
||||
extent: options.extent,
|
||||
opaque: false,
|
||||
projection: options.projection,
|
||||
tileGrid: options.tileGrid
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@ goog.require('ol.tilegrid.TileGrid');
|
||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
||||
* crossOrigin: (null|string|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* opaque: (boolean|undefined),
|
||||
* projection: (ol.Projection|undefined),
|
||||
* tileGrid: (ol.tilegrid.TileGrid|undefined),
|
||||
* tileUrlFunction: (ol.TileUrlFunctionType|undefined)}}
|
||||
@@ -35,6 +36,7 @@ ol.source.ImageTileSource = function(options) {
|
||||
goog.base(this, {
|
||||
attributions: options.attributions,
|
||||
extent: options.extent,
|
||||
opaque: options.opaque,
|
||||
projection: options.projection,
|
||||
tileGrid: options.tileGrid
|
||||
});
|
||||
|
||||
@@ -26,6 +26,7 @@ ol.source.MapQuestOSM = function() {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: attributions,
|
||||
opaque: true,
|
||||
maxZoom: 28,
|
||||
url: 'http://otile{1-4}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg'
|
||||
});
|
||||
@@ -54,6 +55,7 @@ ol.source.MapQuestOpenAerial = function() {
|
||||
goog.base(this, {
|
||||
attributions: attributions,
|
||||
maxZoom: 18,
|
||||
opaque: true,
|
||||
url: 'http://oatile{1-4}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg'
|
||||
});
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ ol.source.OpenStreetMap = function() {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: [attribution],
|
||||
opaque: true,
|
||||
maxZoom: 18,
|
||||
url: 'http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
||||
});
|
||||
|
||||
@@ -85,6 +85,7 @@ ol.source.Stamen = function(stamenOptions) {
|
||||
goog.base(this, {
|
||||
attributions: [attribution],
|
||||
maxZoom: config.maxZoom,
|
||||
opaque: false,
|
||||
url: 'http://{a-d}.tile.stamen.com/' + layer + '/{z}/{x}/{y}.' + config.type
|
||||
});
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
||||
} else {
|
||||
tileUrlFunction = ol.TileUrlFunction.nullTileUrlFunction;
|
||||
}
|
||||
|
||||
var transparent = goog.isDef(tiledWMSOptions.transparent) ?
|
||||
tiledWMSOptions.transparent : true;
|
||||
var extent = tiledWMSOptions.extent;
|
||||
|
||||
var tileCoordTransform = function(tileCoord, tileGrid, projection) {
|
||||
@@ -70,6 +71,7 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
||||
crossOrigin: tiledWMSOptions.crossOrigin,
|
||||
extent: extent,
|
||||
tileGrid: tiledWMSOptions.tileGrid,
|
||||
opaque: !transparent,
|
||||
projection: tiledWMSOptions.projection,
|
||||
tileUrlFunction: ol.TileUrlFunction.withTileCoordTransform(
|
||||
tileCoordTransform, tileUrlFunction)
|
||||
|
||||
@@ -15,6 +15,7 @@ goog.require('ol.tilegrid.TileGrid');
|
||||
/**
|
||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* opaque: (boolean|undefined),
|
||||
* projection: (ol.Projection|undefined),
|
||||
* tileGrid: (ol.tilegrid.TileGrid|undefined)}}
|
||||
*/
|
||||
@@ -35,6 +36,13 @@ ol.source.TileSource = function(tileSourceOptions) {
|
||||
projection: tileSourceOptions.projection
|
||||
});
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.opaque_ = goog.isDef(tileSourceOptions.opaque) ?
|
||||
tileSourceOptions.opaque : false;
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {ol.tilegrid.TileGrid}
|
||||
@@ -98,6 +106,14 @@ ol.source.TileSource.prototype.findLoadedTiles = function(loadedTilesByZ,
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean} Opaque.
|
||||
*/
|
||||
ol.source.TileSource.prototype.getOpaque = function() {
|
||||
return this.opaque_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user