Hi Olivier and Steve,

I try to follow your way but it din't work <img class='smiley' src='http://n6.nabble.com/images/smiley/anim_crazy.gif' />  It's sure I have forgot something ...

http://pofableau.com/openlayer/multicouche.html

the overlay code   is ok for <b>depart</b> and <b>calque </b>but without possibility to scaling with panZoom. 

It's the pb exposed in the beginning of this topic.
the overlay <b>départ2</b> who use your recommandation isn't visible on the map<img class='smiley' src='http://n6.nabble.com/images/smiley/smiley_unhappy.gif' />

I use this code :

 <b><pre> 
  var style = new OpenLayers.Style(
                OpenLayers.Util.applyDefaults(
                {fillColor: "green", fillOpacity: 1, strokeColor: "black"},
                  { 
                   rules: [
                        new OpenLayers.Rule({
                        maxScaleDenominator: 200000000,
                        minScaleDenominator: 100000000,
                        symbolizer: { 
                        externalGraphic: 'a_img/travauxorange.png', 
                        graphicHeight: 60*18/10 , 
                        graphicWidth: 65*18/10
                        }
                }),
                        new OpenLayers.Rule({
                        maxScaleDenominator: 100000000,
                        symbolizer: { 
                        externalGraphic: 'a_img/travauxorange.png', 
                        graphicHeight: 60*18/5, 
                        graphicWidth: 65*18/5
                        }
                })                                                                                      
           ]
    }));                                                                                        
                
        var depart = new OpenLayers.Layer.Vector("Depart", {
        styleMap: new OpenLayers.StyleMap(style) });
        
        map.addLayer(depart);
</pre></b>

Steve I wrote the following code for <b>depart</b> and <b>calque</b> but there is no change for scale the Image as you can see. May be It's necessary to have a time out for the script ?

<b><pre>
var z= map.getScale();
 
var graphicWidth = 55;
var graphicHeight = 50;
 
var scaleFactorWidth =  graphicWidth * z;
var scaleFactorHeight = graphicHeight * z;
  
                var depart2 = new OpenLayers.Layer.Vector("Départ2");
                var feature = new OpenLayers.Feature.Vector(
                new OpenLayers.Geometry.Point(2.534000,48.387000).transform(
          new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
          new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
        ),
                {some:'data'},
                {externalGraphic: 'a_img/travauxorange.png', graphicHeight: graphicHeight, graphicWidth: scaleFactorWidth});
                depart2.addFeatures(feature);

</pre>
</b>
Thank a lot  for your help.

Christian



        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/pb-with-map-getZoom-tp4982396p4982672.html">Re: pb with map.getZoom</a><br/>
Sent from the <a href="http://osgeo-org.1560.n6.nabble.com/OpenLayers-Users-f3910695.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br/>