[OpenLayers-Dev] #736 (external graphic as style for vector points)

Christopher Schmidt crschmidt at metacarta.com
Mon Jun 4 18:45:11 EDT 2007


On Thu, May 31, 2007 at 11:08:42PM +0200, Andreas Hocevar wrote:
> How it works:
> The setStyle method of the renderer checks for a style property
> "externalGraphic", which contains an URI to a bitmap. If this property
> is set, the original "circle" node is removed from the root node, and
> a new "image" node with the same properties and the required
> attributes is created.
> 
> As in the SLD specification, only a size for the bitmap can be
> specified. So external graphics will always be rendered with same
> width and height. For width and height, the existing pointRadius
> property is used.

I would like to recommend we change this. Although this is true in SLD,
it is not true in other image descirption formats, and it avoids too
large of a use case.

Instead of using pointRadius, I recommend we use two additional propeties:
graphicWidth/graphicHeight. For SLD parsing, these can be set to the
same thing (in the same way that the pointRadius is currently set), and
for other formats that might have support for differently dimensioned
images, we can support those. I assume this is possible in SVG/VML: if
it is, I'd like to see it happen before we put this in.

Does that seem sane? 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list