Hi all,

 

I have a function to create my map :

CreateMap: function() {

      var objMap = new OpenLayers.Map( 'viewport', {

            projection: ProjectionMap,

            maxResolution: ResolutionMap,

            units: UnitsMap,

            maxExtent: new OpenLayers.Bounds(ExtentsMapMinX,
ExtentsMapMinY, ExtentsMapMaxX, ExtentsMapMaxY),

            scales: ScalesMapArray } );

      return objMap;

}

 

On this map with these parameters, I can add a MapServer layer with this
:

LayerMapServer: function() {

      MapServerLayer = new OpenLayers.Layer.MapServer( szMap,
"http://localhost/cgi-bin/mapserv.exe";,

            { layers: '', map: szMapFile }, { singleTile: false } );

      oMap.addLayer(MapServerLayer);

      oMap.zoomToMaxExtent();

}

 

 

The map and this MapServer layer are correct.

But I have to add a KaMap layer in my map with this function :

LayerKaMap: function() {

      KaMapLayer = new OpenLayers.Layer.KaMap( "world", "kamap.php", {
g: '', map: "world", i: 'jpeg' } );

      oMap.addLayer(KaMapLayer);

      oMap.addControl(new OpenLayers.Control.LayerSwitcher());

      oMap.zoomToMaxExtent();

}

 

My error : with some map parameters (units, maxExtent and scales), the
kaMap layer can't be drawn, and I have a blank page.....

 

If I comment these three parameters (units, maxExtent and scales) in the
CreateMap() function, my KaMap layer is displayed, but my MapServer
layer can't be drawn ....

 

Why this error ??

Is that someone has an idea of solution, to help me ??

 

Thank you for answers.

Jean-Daniel

_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

Reply via email to