[OpenLayers-Dev] kaMap layer error on loading

Jean-Daniel JDG. GONON jdg at geosphere.fr
Wed Apr 15 09:28:41 EDT 2009


Hi

 

person has no idea to help me ? 
Does this problem has already been met ?

 

thank you in advance

JD

 

 

________________________________

De : Jean-Daniel JDG. GONON 
Envoyé : mardi 14 avril 2009 17:37
À : 'dev at openlayers.org'
Objet : TR: kaMap layer error on loading

 

Hi all,

 

Further to my message below, I can normally draw my MapServer layer with :

    CoucheMapServer: function() {

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

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

            oMap.addLayer(MapServerLayer);

            oMap.zoomToMaxExtent();

    }

 

For KaMap layer, I always have a problem with this function :

      CoucheKaMap: function() {

      KaMapLayer = new OpenLayers.Layer.KaMap( szMap,

              "kernel/myKaTile.php",

              { map: szMap, sid: sessionId, i: szImgFormat, qId:'-1', id:'127', la:'Couche1' } );

      oMap.addLayer(KaMapLayer);

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

      oMap.zoomToMaxExtent();

    } 

With this, I can't draw my layer.

My map file is the same for these 2 layers, but in kaMap layers, its extents ("t" and "l" parameters visibles in URL tile) are outside of extents defined in the map file.

 

I don't understand....

 

Anybody can help me ??

Thank you in advance !!

Jean-Daniel

 

________________________________

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

      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

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


More information about the Dev mailing list