Merge pull request #21034 from danmana/openlayers

openlayers: make TileWMS projection optional
This commit is contained in:
Mine Starks
2017-12-14 09:15:12 -08:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
// Junyoung Clare Jang <https://github.com/ailrun>
// Alexandre Melard <https://github.com/mylen>
// Chad Johnston <https://github.com/iamthechad>
// Dan Manastireanu <https://github.com/danmana>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Definitions partially generated using tsd-jsdoc (https://github.com/englercj/tsd-jsdoc)
@@ -14042,7 +14043,7 @@ declare module olx {
hidpi?: boolean;
logo?: (string | olx.LogoOptions);
tileGrid?: ol.tilegrid.TileGrid;
projection: ol.ProjectionLike;
projection?: ol.ProjectionLike;
reprojectionErrorThreshold?: number;
serverType?: (ol.source.wms.ServerType | string);
tileLoadFunction?: ol.TileLoadFunctionType;

View File

@@ -558,6 +558,12 @@ let tileWMS: ol.source.TileWMS = new ol.source.TileWMS({
url: stringValue
});
//test without projection
tileWMS = new ol.source.TileWMS({
params: {},
serverType: stringValue,
url: stringValue
});
voidValue = tileWMS.updateParams(tileWMS.getParams());
stringValue = tileWMS.getGetFeatureInfoUrl([0, 0], 1, "EPSG:4326", {});