[Tilecache] OverviewMap: custom layer + custom projection

Martin Ouellet geomartino at gmail.com
Thu May 15 11:16:26 EDT 2008


Hi,

I would like to have a custom layer (different from the baselayer) and a
custom projection (same as the base layer of course) in my overviewmap:

I've tried this:

//baselayer based on tilecache
 baseLayer = new OpenLayers.Layer.WMS ( "Carte de base",
                                                   ["
http://osl1/tilecache/tilecache.py?",
                                                    "
http://osl2/tilecache/tilecache.py?",
                                                    "
http://osl3/tilecache/tilecache.py?",
                                                    "
http://osl4/tilecache/tilecache.py?"
                                                   ],
                                                 {  layers : "siglight3",
                                                    map_projection:
"init=epsg:42105",
                                                    transparent: "true" },
                                                 {  isBaseLayer: true }
                                                );

//WMS layer for the overview
var wms_ov = new OpenLayers.Layer.WMS ( "overview",
                                        "http:/...",
                                        { layers : "muncp",
                                          map_projection: "init=epsg:42105",
                                          transparent: "true",
                                          format: "gif"
                                        },
                                     { isBaseLayer: false, singleTile: true
}
                                     );
//options for the ov
var ov_options = {layers: [wms_ov],
                maxExtent: new OpenLayers.Bounds(30000, 75000, 1709360,
2120440),
                projection:"EPSG:42105",
                units: "m"
               };

//adding the control
 var overview = new OpenLayers.Control.OverviewMap( {mapOptions: ov_options}
);
 map.addControl(overview);

With this configuration, I still have a popup message you tell me that the
projection of the ov must be equal to the one in the baselayer (which I
do).
And, If a check the call made by openlayers for the ov, the SRS seem to be
4326 (why?) and the bounding box is in lat/lon (Why?)

http://mdrim00-000251/MapServer5/mapserv.exe?MAP=overview.map&LAYERS=direction_territoriale&MAP_PROJECTION=init%3Depsg%3A42105&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-180,-90,332,422&WIDTH=256&HEIGHT=256

any advice on this?

MartinO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20080515/c4f24b73/attachment.html


More information about the Tilecache mailing list