Remove ImageLayer from wmts-from-capabilities example
This commit is contained in:
@@ -1,25 +1,21 @@
|
||||
goog.require('ol.Attribution');
|
||||
goog.require('ol.Coordinate');
|
||||
goog.require('ol.Extent');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.RendererHint');
|
||||
goog.require('ol.View2D');
|
||||
goog.require('ol.layer.ImageLayer');
|
||||
goog.require('ol.layer.TileLayer');
|
||||
goog.require('ol.parser.ogc.WMTSCapabilities');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.SingleImageWMS');
|
||||
goog.require('ol.source.WMTS');
|
||||
|
||||
|
||||
var map, capabilities;
|
||||
var parser = new ol.parser.ogc.WMTSCapabilities();
|
||||
var projection = ol.projection.configureProj4jsProjection({
|
||||
code: 'EPSG:21781',
|
||||
extent: new ol.Extent(485869.5728, 76443.1884, 837076.5648, 299941.7864)
|
||||
});
|
||||
|
||||
var map, capabilities;
|
||||
var parser = new ol.parser.ogc.WMTSCapabilities();
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml', true);
|
||||
|
||||
@@ -37,18 +33,6 @@ xhr.onload = function() {
|
||||
layers: [
|
||||
new ol.layer.TileLayer({
|
||||
source: new ol.source.WMTS(wmtsOptions)
|
||||
}),
|
||||
new ol.layer.ImageLayer({
|
||||
source: new ol.source.SingleImageWMS({
|
||||
url: 'http://wms.geo.admin.ch/',
|
||||
attributions: [new ol.Attribution(
|
||||
'© <a href="' +
|
||||
'http://www.geo.admin.ch/internet/geoportal/en/home.html">' +
|
||||
'National parks / geo.admin.ch</a>')],
|
||||
params: {
|
||||
'LAYERS': 'ch.bafu.schutzgebiete-paerke_nationaler_bedeutung'
|
||||
}
|
||||
})
|
||||
})
|
||||
],
|
||||
renderer: ol.RendererHint.CANVAS,
|
||||
|
||||
Reference in New Issue
Block a user