<font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">Hi Jan,</span></font><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">I search for a solution but without success... I tried some scripts but it was the same result... nothing!</span></font></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">I think it is not possible to define a background picture for a polygon but only for features like points...</span></font></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><span class="Apple-style-span" style="white-space: pre-wrap; "><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px;">And unfortunately, I have no other options for now ...</span></font></span></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: pre-wrap;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: pre-wrap;">Best regards,</span></font></div><div><font class="Apple-style-span" face="Arial" size="3"><span class="Apple-style-span" style="font-size: 12px; white-space: pre-wrap;">Jérome</span></font></div><div><font class="Apple-style-span" face="sans-serif" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre-wrap;"><br></span></font></div><div><font class="Apple-style-span" face="sans-serif" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: pre-wrap;"><br></span></font><div><div>Le 31 août 09 à 14:37, Jan.Sørensen (via Nabble) a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Jerome, <br><br>Thanks for the reply. <br>I tried using the externalGraphic, but without much success. <br>The code is as follows: <br><br>var stylemap = new OpenLayers.StyleMap({externalGraphic: '/images/country.jpg'}); <br><br>in my _buildStyle function where I define theme and rules respectively. <br><br>The problem is that when I define colors for onSelect event its ok: <br><br>var stylemap = new OpenLayers.StyleMap({'default':theme, 'select': {'strokeColor': '#59bce6', 'fillColor': '#59bce6', 'strokeWidth': 1}}); <br><br>I read this sample: <a href="http://docs.openlayers.org/library/feature_styling.html" target="_top" rel="nofollow">http://docs.openlayers.org/library/feature_styling.html</a><br>and the only difference is that I am using GML instead of vectors. <br><br>Could that be the problem ? <br><br>Cheers, <br>js <br><br><blockquote class="quote light-black dark-border-color"><div class="quote light-border-color"> <div class="quote-author" style="font-weight: bold;">Jerome Freyre wrote:</div> <div class="quote-message shrinkable-quote">Hi Jan, <br><br>maybe you can use the property <br><br><pre>externalGraphic : myStaticImage
</pre><br>in the style definition <br><br>Sincerly, <br>Jérome <br><br><br><blockquote class="quote light-black dark-border-color"><div class="quote light-border-color"> <div class="quote-author" style="font-weight: bold;">Jan.Sørensen wrote:</div> <div class="quote-message shrinkable-quote">Hi, <br><br>I'm pretty new to Open Layers, so probably I'm looking for something obvious :) <br><br>I want to fill country with instead of a color with a static image <br>Up to now I have a default style that upon mouse over I successfully changes color of the country that mouse cursor is currently on. <br><br>Anyone can give me a shot ? <br><br>Cheers, <br>JS <br></div> </div></blockquote> </div> </div></blockquote> </blockquote></div><br></div>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/How-to-replace-country-color-with-image-tp3551757p3558592.html">Re: [OpenLayers-Users] How to replace country color with image ?</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>