Merge branch 'master' of github.com:openlayers/ol3 into vector
This commit is contained in:
@@ -6,11 +6,11 @@ goog.require('goog.array');
|
||||
goog.require('goog.net.Jsonp');
|
||||
goog.require('ol.Attribution');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.Size');
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.TileRange');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.ImageTileSource');
|
||||
goog.require('ol.tilegrid.XYZ');
|
||||
|
||||
@@ -36,7 +36,7 @@ ol.BingMapsStyle = {
|
||||
ol.source.BingMaps = function(bingMapsOptions) {
|
||||
|
||||
goog.base(this, {
|
||||
projection: ol.Projection.getFromCode('EPSG:3857')
|
||||
projection: ol.projection.getFromCode('EPSG:3857')
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -123,8 +123,8 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
||||
};
|
||||
})));
|
||||
|
||||
var transform = ol.Projection.getTransform(
|
||||
ol.Projection.getFromCode('EPSG:4326'), this.getProjection());
|
||||
var transform = ol.projection.getTransform(
|
||||
ol.projection.getFromCode('EPSG:4326'), this.getProjection());
|
||||
var attributions = goog.array.map(
|
||||
resource.imageryProviders,
|
||||
function(imageryProvider) {
|
||||
|
||||
@@ -4,8 +4,8 @@ goog.require('goog.uri.utils');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Image');
|
||||
goog.require('ol.ImageUrlFunction');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.Size');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.ImageSource');
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ goog.require('ol.source.ImageSource');
|
||||
*/
|
||||
ol.source.SingleImageWMS = function(options) {
|
||||
|
||||
var projection = ol.Projection.createProjection(
|
||||
var projection = ol.projection.createProjection(
|
||||
options.projection, 'EPSG:3857');
|
||||
var projectionExtent = projection.getExtent();
|
||||
|
||||
@@ -38,11 +38,13 @@ ol.source.SingleImageWMS = function(options) {
|
||||
baseParams[version >= '1.3' ? 'CRS' : 'SRS'] = projection.getCode();
|
||||
goog.object.extend(baseParams, options.params);
|
||||
|
||||
var axisOrientation = projection.getAxisOrientation();
|
||||
var imageUrlFunction;
|
||||
if (options.url) {
|
||||
var url = goog.uri.utils.appendParamsFromMap(
|
||||
options.url, baseParams);
|
||||
imageUrlFunction = ol.ImageUrlFunction.createBboxParam(url);
|
||||
imageUrlFunction =
|
||||
ol.ImageUrlFunction.createBboxParam(url, axisOrientation);
|
||||
} else {
|
||||
imageUrlFunction =
|
||||
ol.ImageUrlFunction.nullImageUrlFunction;
|
||||
|
||||
@@ -7,9 +7,9 @@ goog.require('goog.array');
|
||||
goog.require('goog.object');
|
||||
goog.require('goog.uri.utils');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.ImageTileSource');
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ goog.require('ol.source.ImageTileSource');
|
||||
* @param {ol.source.TiledWMSOptions} tiledWMSOptions options.
|
||||
*/
|
||||
ol.source.TiledWMS = function(tiledWMSOptions) {
|
||||
var projection = ol.Projection.createProjection(
|
||||
var projection = ol.projection.createProjection(
|
||||
tiledWMSOptions.projection, 'EPSG:3857');
|
||||
var projectionExtent = projection.getExtent();
|
||||
|
||||
@@ -52,19 +52,22 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
||||
baseParams[version >= '1.3' ? 'CRS' : 'SRS'] = projection.getCode();
|
||||
goog.object.extend(baseParams, tiledWMSOptions.params);
|
||||
|
||||
var axisOrientation = projection.getAxisOrientation();
|
||||
var tileUrlFunction;
|
||||
if (tiledWMSOptions.urls) {
|
||||
var tileUrlFunctions = goog.array.map(
|
||||
tiledWMSOptions.urls, function(url) {
|
||||
url = goog.uri.utils.appendParamsFromMap(url, baseParams);
|
||||
return ol.TileUrlFunction.createBboxParam(url, tileGrid);
|
||||
return ol.TileUrlFunction.createBboxParam(
|
||||
url, tileGrid, axisOrientation);
|
||||
});
|
||||
tileUrlFunction = ol.TileUrlFunction.createFromTileUrlFunctions(
|
||||
tileUrlFunctions);
|
||||
} else if (tiledWMSOptions.url) {
|
||||
var url = goog.uri.utils.appendParamsFromMap(
|
||||
tiledWMSOptions.url, baseParams);
|
||||
tileUrlFunction = ol.TileUrlFunction.createBboxParam(url, tileGrid);
|
||||
tileUrlFunction =
|
||||
ol.TileUrlFunction.createBboxParam(url, tileGrid, axisOrientation);
|
||||
} else {
|
||||
tileUrlFunction = ol.TileUrlFunction.nullTileUrlFunction;
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ goog.require('goog.asserts');
|
||||
goog.require('goog.net.jsloader');
|
||||
goog.require('ol.Attribution');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.TileRange');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.ImageTileSource');
|
||||
goog.require('ol.tilegrid.XYZ');
|
||||
|
||||
@@ -52,7 +52,7 @@ goog.exportSymbol('grid', grid);
|
||||
ol.source.TileJSON = function(tileJsonOptions) {
|
||||
|
||||
goog.base(this, {
|
||||
projection: ol.Projection.getFromCode('EPSG:3857')
|
||||
projection: ol.projection.getFromCode('EPSG:3857')
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -80,7 +80,7 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function() {
|
||||
|
||||
var tileJSON = ol.tilejson.grids_.pop();
|
||||
|
||||
var epsg4326Projection = ol.Projection.getFromCode('EPSG:4326');
|
||||
var epsg4326Projection = ol.projection.getFromCode('EPSG:4326');
|
||||
|
||||
var epsg4326Extent, extent;
|
||||
if (goog.isDef(tileJSON.bounds)) {
|
||||
@@ -88,7 +88,7 @@ ol.source.TileJSON.prototype.handleTileJSONResponse = function() {
|
||||
epsg4326Extent = new ol.Extent(
|
||||
bounds[0], bounds[1], bounds[2], bounds[3]);
|
||||
extent = epsg4326Extent.transform(
|
||||
ol.Projection.getTransform(epsg4326Projection, this.getProjection()));
|
||||
ol.projection.getTransform(epsg4326Projection, this.getProjection()));
|
||||
this.setExtent(extent);
|
||||
} else {
|
||||
epsg4326Extent = null;
|
||||
|
||||
@@ -10,6 +10,7 @@ goog.require('ol.Projection');
|
||||
goog.require('ol.TileCoord');
|
||||
goog.require('ol.TileUrlFunction');
|
||||
goog.require('ol.TileUrlFunctionType');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.ImageTileSource');
|
||||
goog.require('ol.tilegrid.XYZ');
|
||||
|
||||
@@ -36,7 +37,7 @@ ol.source.XYZOptions;
|
||||
ol.source.XYZ = function(xyzOptions) {
|
||||
|
||||
var projection = xyzOptions.projection ||
|
||||
ol.Projection.getFromCode('EPSG:3857');
|
||||
ol.projection.getFromCode('EPSG:3857');
|
||||
|
||||
/**
|
||||
* @type {ol.TileUrlFunctionType}
|
||||
|
||||
Reference in New Issue
Block a user