Merge pull request #221 from elemoine/imagelayer
wms-custom-proj example broken when hosted
This commit is contained in:
@@ -29,9 +29,8 @@ ol.Projection.addProjection(epsg21781);
|
|||||||
// We give the single image source a set of resolutions. This prevents the
|
// We give the single image source a set of resolutions. This prevents the
|
||||||
// source from requesting images of arbitrary resolutions.
|
// source from requesting images of arbitrary resolutions.
|
||||||
var projectionExtent = epsg21781.getExtent();
|
var projectionExtent = epsg21781.getExtent();
|
||||||
var maxResolution = Math.max(
|
var maxResolution = Math.max(projectionExtent.getWidth(),
|
||||||
projectionExtent.maxX - projectionExtent.minX,
|
projectionExtent.getHeight()) / 256;
|
||||||
projectionExtent.maxY - projectionExtent.minY) / 256;
|
|
||||||
var resolutions = new Array(10);
|
var resolutions = new Array(10);
|
||||||
for (var i = 0; i < 10; ++i) {
|
for (var i = 0; i < 10; ++i) {
|
||||||
resolutions[i] = maxResolution / Math.pow(2.0, i);
|
resolutions[i] = maxResolution / Math.pow(2.0, i);
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
@exportSymbol ol.Extent
|
@exportSymbol ol.Extent
|
||||||
|
@exportProperty ol.Extent.prototype.getHeight
|
||||||
|
@exportProperty ol.Extent.prototype.getWidth
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
goog.provide('ol.ImageUrlFunction');
|
goog.provide('ol.ImageUrlFunction');
|
||||||
goog.provide('ol.ImageUrlFunctionType');
|
goog.provide('ol.ImageUrlFunctionType');
|
||||||
|
|
||||||
|
goog.require('goog.uri.utils');
|
||||||
goog.require('ol.Extent');
|
goog.require('ol.Extent');
|
||||||
goog.require('ol.Size');
|
goog.require('ol.Size');
|
||||||
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
goog.provide('ol.source.SingleImageWMS');
|
goog.provide('ol.source.SingleImageWMS');
|
||||||
|
|
||||||
|
goog.require('goog.uri.utils');
|
||||||
goog.require('ol.Extent');
|
goog.require('ol.Extent');
|
||||||
goog.require('ol.Image');
|
goog.require('ol.Image');
|
||||||
goog.require('ol.ImageUrlFunction');
|
goog.require('ol.ImageUrlFunction');
|
||||||
|
|||||||
Reference in New Issue
Block a user