[OpenLayers-Dev] kaMap layer error on loading

Jean-Daniel JDG. GONON jdg at geosphere.fr
Wed Apr 8 04:41:06 EDT 2009

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,

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






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.addControl(new OpenLayers.Control.LayerSwitcher());




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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20090408/b2a35236/attachment.html

More information about the Dev mailing list