[OpenLayers-Users] Drawing a point feature with image and background color..

Carlos Krefft ckrefft at rsmas.miami.edu
Fri Feb 17 11:40:02 EST 2012


Use fillColor.

.

fillColor: "#FF5500",

fillOpacity: 0.7,

.

 

Carlos K.

 

 

From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of jkm
Sent: Friday, February 17, 2012 5:58 AM
To: users at openlayers.org
Subject: [OpenLayers-Users] Drawing a point feature with image and
background color..

 

Hi, 

 

I would like to know if it is possible to draw a point feature with a
background color..

 

I define a style like that:

 

ImgStyle = {

        externalGraphic: imgURL,

        label: text,

        labelXOffset: "0",

        labelYOffset: "-10",

        fontColor: txt_colfont,

        fontSize: "10px",

        fontFamily: "Arial",

        fontWeight: "bold",

        pointRadius: 10,

        labelAlign: "cm",

        labelPadding: "3px",

        labelBackgroundColor: txt_colback,

        labelBorderColor: "#cfcfcf",

        labelBorderSize: "1px"

    };

 

And what I would like to do, is draw a background to the image..

 

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..

 

But, I would like to draw as a unique element... Because I'm loading a large
amount of markers to the map.

 

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..

 

Thanks!

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120217/e65a8a8e/attachment-0001.html


More information about the Users mailing list