no change   ..... (((((((((((((<div><br></div><div><br></div><div><br><div><div>Le 20 juin 2012 à 18:11, Olivier Terral-3 [via OSGeo.org] a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">

        <div>Define your style variable like this:</div><div><br></div><div>var style = new OpenLayers.Style({ </div><div> <span class="Apple-tab-span" style="white-space:pre">    </span>externalGraphic: '<a href="http://pofableau.com/openlayer/a_img/travauxorange.png'" target="_top" rel="nofollow" link="external">http://pofableau.com/openlayer/a_img/travauxorange.png'</a>, </div><div> <span class="Apple-tab-span" style="white-space:pre">        </span>graphicHeight: "${size}", </div><div> <span class="Apple-tab-span" style="white-space:pre">      </span>graphicWidth: "${size}" </div><div> }, {</div><div> <span class="Apple-tab-span" style="white-space:pre">          </span>context: { </div><div> <span class="Apple-tab-span" style="white-space:pre">                       </span>size: function() { </div><div> <span class="Apple-tab-span" style="white-space:pre">                               </span>return 60*18/map.getZoom(); </div><div> <span class="Apple-tab-span" style="white-space:pre">                      </span>} </div><div> <span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>}</div><div>);</div><div><br></div><br><div><div>Le 20 juin 2012 à 15:01, christian bleau a écrit :</div><br class="Apple-interchange-newline"><blockquote style="border-left:2px solid #CCCCCC;padding:0 1em" type="cite">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 ...

<a href="http://pofableau.com/openlayer/multicouche.html" target="_top" rel="nofollow" link="external">http://pofableau.com/openlayer/multicouche.html</a>

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" target="_top" rel="nofollow" link="external">Re: pb with map.getZoom</a><br>
Sent from the <a href="http://osgeo-org.1560.n6.nabble.com/OpenLayers-Users-f3910695.html" target="_top" rel="nofollow" link="external">OpenLayers Users mailing list archive</a> at <a href="http://Nabble.com/" target="_top" rel="nofollow" link="external">Nabble.com</a>.<br>_______________________________________________<br>Users mailing list<br><a href="x-msg://73/user/SendEmail.jtp?type=node&amp;node=4982774&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_top" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="font-family: Helvetica; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Olivier Terral<br></div><br class="Apple-interchange-newline"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span><img height="46" width="199" id="8e4d12b4-f3cc-4b86-bc36-6b0df76f2288" apple-width="yes" apple-height="yes" src="http://osgeo-org.1560.n6.nabble.com/attachment/4982774/0/PastedGraphic-1.gif"></span><span class="Apple-style-span" style="border-collapse: separate; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Helvetica; "><br class="Apple-interchange-newline"> </span><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>GEOMATIC Ingénierie SA<br>Société du groupe Ringier<br>Chemin des Croisettes 26<br>1066 Epalinges<br><a href="http://www.geomatic.ch/" target="_top" rel="nofollow" link="external">www.geomatic.ch</a></div><div><a href="http://www.thevirtualcity.ch/" target="_top" rel="nofollow" link="external">www.thevirtualcity.ch</a><br>Tél:: +41 (21) 651 30 00<br>Fax: +41 (21) 651 30 09</div><div><br></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"></span></div></span></span></span></span></span></span></span></span></span>
</div>
</span></span></span></span></span></span></span></span></span></div><br><br>_______________________________________________
<br>Users mailing list
<br><a href="x-msg://73/user/SendEmail.jtp?type=node&amp;node=4982774&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_top" rel="nofollow" link="external">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
        
        <br>
        <br>
        <hr noshade="noshade" size="1" color="#cccccc">
        <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://osgeo-org.1560.n6.nabble.com/pb-with-map-getZoom-tp4982396p4982774.html" target="_top" rel="nofollow" link="external">http://osgeo-org.1560.n6.nabble.com/pb-with-map-getZoom-tp4982396p4982774.html</a>
        </div>
        <div style="color:#666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from pb with map.getZoom, <a href="" target="_top" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://osgeo-org.1560.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_top" link="external">NAML</a>
        </div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Lucida Console'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Christian</div><div><br></div><div><a href="http://www.pofableau.com/" target="_top" rel="nofollow" link="external">Pof@Bleau</a></div><div><br></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/pb-with-map-getZoom-tp4982396p4982777.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/>