[Dutch] Fwd: [OpenLayers-Users] Openlayers WMS / WMTS 28992 offset

Milo van der Linden milo op opengeogroep.nl
Vr Jan 13 03:35:15 PST 2012


---------- Doorgestuurd bericht ----------
Van: "Lucas Heezen - Covadis" <heezen op covadis.nl>
Datum: 13 jan. 2012 11:34
Onderwerp: [OpenLayers-Users] Openlayers WMS / WMTS 28992 offset
Aan: "openlayers-users op lists.osgeo.org" <openlayers-users op lists.osgeo.org>

 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****

[image: Beschrijving: http://www.covadis.nl/emailkop/logo.gif]****

Covadis b.v. ****

t: 026 3616600 ****

Geograaf 12 ****

f: 026 3612317 ****

6921 EW Duiven ****

e: heezen op covadis.nl****

** **

** **

_______________________________________________
Users mailing list
Users op lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
------------- volgend deel ------------
Een HTML-bijlage is gescrubt...
URL: <http://lists.osgeo.org/pipermail/dutch/attachments/20120113/7e4198fd/attachment.html>
------------- volgend deel ------------
Een niet-tekst bijlage is gescrubt...
Naam: image002.gif
Type: image/gif
Grootte: 2140 bytes
Omschrijving: niet beschikbaar
URL : <http://lists.osgeo.org/pipermail/dutch/attachments/20120113/7e4198fd/attachment.gif>
------------- volgend deel ------------
Een niet-tekst bijlage is gescrubt...
Naam: image002.gif
Type: image/gif
Grootte: 2140 bytes
Omschrijving: niet beschikbaar
URL : <http://lists.osgeo.org/pipermail/dutch/attachments/20120113/7e4198fd/attachment-0001.gif>


More information about the Dutch mailing list