<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.first, li.first, div.first
        {mso-style-name:first;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.pre
        {mso-style-name:pre;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal style='margin-left:22.5pt'>“I'm drawing features with images defined by the externalGraphic property.. Then.. I can't use the fillColor.. ?”<o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You cannot use fillColor with an externalGraphic as it says in the documentation . But your original question states you will be using TWO features “I'm drawing two elements in the same position”.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So use fillColor for your background feature and externalGraphic for your foreground feature.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:22.5pt'>“Or is there any other way to draw the feature withous using externalGraphic?”<o:p></o:p></p><p class=MsoNormal style='margin-left:22.5pt'><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Yes, you can simply omit the externalGraphic and the feature will draw without the a graphic, just with the style.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Carlos K.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> jkm [mailto:rifins@gmail.com] <br><b>Sent:</b> Friday, February 17, 2012 12:08 PM<br><b>To:</b> Carlos Krefft<br><b>Cc:</b> users@openlayers.org<br><b>Subject:</b> Re: [OpenLayers-Users] Drawing a point feature with image and background color..<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Uhm..<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>But.. as seen in this link..<o:p></o:p></p></div><div><p class=MsoNormal><a href="http://docs.openlayers.org/library/feature_styling.html">http://docs.openlayers.org/library/feature_styling.html</a> <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='text-align:justify;line-height:13.5pt;background:white'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>"fillColor<o:p></o:p></span></p><p class=first style='margin-left:.5in;text-align:justify;line-height:13.5pt;background:white;margin-top:0px!important'><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>Default is </span><span class=pre><span style='font-size:10.0pt;font-family:"Courier New";background:#ECF0F3'>#ee9900</span></span><span style='font-size:10.5pt;font-family:"Arial","sans-serif"'>. This is the color used for filling in Polygons. It is also used in the center of marks for points: the interior color of circles or other shapes. It is not used if an externalGraphic is applied to a point."<o:p></o:p></span></p><div><p class=MsoNormal style='margin-left:22.5pt'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:22.5pt'>I'm drawing features with images defined by the externalGraphic property.. Then.. I can't use the fillColor.. ?<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:22.5pt'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:22.5pt'>Or is there any other way to draw the feature withous using externalGraphic?<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:22.5pt'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:22.5pt'>Thanks...<o:p></o:p></p></div><div><p class=MsoNormal style='margin-left:22.5pt'><o:p> </o:p></p></div><p class=MsoNormal style='margin-left:22.5pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:22.5pt'>2012/2/17 Carlos Krefft <<a href="mailto:ckrefft@rsmas.miami.edu">ckrefft@rsmas.miami.edu</a>><o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Here are the possible values:</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><a href="http://docs.openlayers.org/library/feature_styling.html#style-properties" target="_blank">http://docs.openlayers.org/library/feature_styling.html#style-properties</a><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Carlos Krefft<br><b>Sent:</b> Friday, February 17, 2012 11:40 AM<br><b>To:</b> 'jkm'; <a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Subject:</b> RE: [OpenLayers-Users] Drawing a point feature with image and background color..</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Use fillColor.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>…</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt;text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'>fillColor: <span style='color:maroon'>"#FF5500"</span>,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt;text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'>fillOpacity: 0.7,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>…</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Carlos K.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a> <a href="mailto:[mailto:openlayers-users-bounces@lists.osgeo.org]" target="_blank">[mailto:openlayers-users-bounces@lists.osgeo.org]</a> <b>On Behalf Of </b>jkm<br><b>Sent:</b> Friday, February 17, 2012 5:58 AM<br><b>To:</b> <a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Subject:</b> [OpenLayers-Users] Drawing a point feature with image and background color..</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>Hi, <o:p></o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>I would like to know if it is possible to draw a point feature with a background color..<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>I define a style like that:<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>ImgStyle = {<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> externalGraphic: imgURL,<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> label: text,<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> labelXOffset: "0",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> labelYOffset: "-10",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> fontColor: txt_colfont,<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> fontSize: "10px",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> fontFamily: "Arial",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> fontWeight: "bold",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> pointRadius: 10,<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> labelAlign: "cm",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> labelPadding: "3px",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> labelBackgroundColor: txt_colback,<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> labelBorderColor: "#cfcfcf",<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> labelBorderSize: "1px"<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> };<o:p></o:p></p></div></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>And what I would like to do, is draw a background to the image..<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>By now, I'm drawing two elements in the same position, one is the point with the externalGraphic, and the other one is the same but without the externalGraphic and with a background color.. With this I can see the effect of a background under the image..<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>But, I would like to draw as a unique element... Because I'm loading a large amount of markers to the map.<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>And also, I would like to apply a cluster strategy to the layer.. And drawing the background and the image as separate features modifies the clustering..<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'>Thanks!<o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:22.5pt'> <o:p></o:p></p></div></div></div></div></div></div><p class=MsoNormal style='margin-left:22.5pt'><o:p> </o:p></p></div></div></body></html>