Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions
+18 -18
View File
@@ -1,32 +1,32 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.extent');
goog.require('ol.layer.Tile');
goog.require('ol.proj');
goog.require('ol.source.OSM');
goog.require('ol.source.WMTS');
goog.require('ol.tilegrid.WMTS');
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_extent_ from '../src/ol/extent.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_proj_ from '../src/ol/proj.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_WMTS_ from '../src/ol/source/WMTS.js';
import _ol_tilegrid_WMTS_ from '../src/ol/tilegrid/WMTS.js';
// create the WMTS tile grid in the google projection
var projection = ol.proj.get('EPSG:3857');
var projection = _ol_proj_.get('EPSG:3857');
var tileSizePixels = 256;
var tileSizeMtrs = ol.extent.getWidth(projection.getExtent()) / tileSizePixels;
var tileSizeMtrs = _ol_extent_.getWidth(projection.getExtent()) / tileSizePixels;
var matrixIds = [];
var resolutions = [];
for (var i = 0; i <= 14; i++) {
matrixIds[i] = i;
resolutions[i] = tileSizeMtrs / Math.pow(2, i);
}
var tileGrid = new ol.tilegrid.WMTS({
origin: ol.extent.getTopLeft(projection.getExtent()),
var tileGrid = new _ol_tilegrid_WMTS_({
origin: _ol_extent_.getTopLeft(projection.getExtent()),
resolutions: resolutions,
matrixIds: matrixIds
});
var scalgoToken = 'CC5BF28A7D96B320C7DFBFD1236B5BEB';
var wmtsSource = new ol.source.WMTS({
var wmtsSource = new _ol_source_WMTS_({
url: 'http://ts2.scalgo.com/olpatch/wmts?token=' + scalgoToken,
layer: 'SRTM_4_1:SRTM_4_1_flooded_sealevels',
format: 'image/png',
@@ -43,18 +43,18 @@ var wmtsSource = new ol.source.WMTS({
}
});
var map = new ol.Map({
var map = new _ol_Map_({
target: 'map',
view: new ol.View({
view: new _ol_View_({
projection: projection,
center: [-9871995, 3566245],
zoom: 6
}),
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
new _ol_layer_Tile_({
source: new _ol_source_OSM_()
}),
new ol.layer.Tile({
new _ol_layer_Tile_({
opacity: 0.5,
source: wmtsSource
})