Hello, I'm having a map which is projected in EPSG:28992. This map has two layers (WMS and a WMTS layer).
var map;
function init() {
// Alle map opties gaan meegeven aan de map,
var mapOptions = {
theme: null,
numZoomLevels: 27,
//controls: [ ],
//maxExtent: bounds,
//maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508,
20037508.34),
maxExtent: new OpenLayers.Bounds(12628.0541, 308179.0423, 283594.4779,
611063.1429),
maxResolution: 1324.21875,//156543.0339,
//maxResolution: "auto",
units: "m",
projection: new OpenLayers.Projection("EPSG:28992"),
displayProjection: new OpenLayers.Projection("EPSG:28992")
};
map = new OpenLayers.Map( "map", mapOptions );
//var osm = new OpenLayers.Layer.OSM();
// If tile matrix identifiers differ from zoom levels (0, 1, 2, ...)
// then they must be explicitly provided.
var matrixIds = new Array(26);
for (var i=0; i<26; ++i) {
matrixIds[i] = "EPSG:28992:" + i;
}
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://localhost/geoserver/ows",
{layers: 'topp:O10004_gemeenten_xml', isBaseLayer: true} , {
opacity: 0.4 } );
var wmts = new OpenLayers.Layer.WMTS({
name: "Medford Buildings",
url:
"http://geodata.nationaalgeoregister.nl/tiles/service/wmts/natura2000?",
layer: "natura2000",
matrixSet: "EPSG:28992",
matrixIds: matrixIds,
format: "image/png",
style: "",
isBaseLayer: false
});
map.addLayers([layer, wmts]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(197177, 442054), 0); // Duiven
}
The result of that map is: http://imageshack.us/photo/my-images/714/imgch.png/
As you can see the colored overlay (WMTS) is nog correct. Am I doing something
wrong with the projection?
Met vriendelijke groet,
Lucas Heezen
[Beschrijving: http://www.covadis.nl/emailkop/logo.gif]
Covadis b.v.
t: 026 3616600
Geograaf 12
f: 026 3612317
6921 EW Duiven
e: [email protected]<mailto:[email protected]>
<<inline: image002.gif>>
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
