[OpenLayers-Dev] kaMap layer error on loading

Jean-Daniel JDG. GONON jdg at geosphere.fr
Thu Apr 9 03:06:02 EDT 2009

Anybody have an answer for my problem ??

Thank you in advance.




De : Jean-Daniel JDG. GONON 
Envoyé : mercredi 8 avril 2009 10:41
À : 'dev at openlayers.org'
Objet : kaMap layer error on loading


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 } );





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/20090409/5ab372e7/attachment.html

More information about the Dev mailing list