[OpenLayers-Users] Re: How to display custom labels inside custom marker icon..?

emmexx emmexx at tiscalinet.it
Thu Mar 17 17:40:08 EDT 2011


Il 17/03/2011 20:18, dbenedetto scrisse:

> pointerEvents: "visiblePainted",
>     externalGraphic: "marker.png", //externalGraphic url from attribute url
> use "${url}" 
> graphicXOffset :  0, 

> what value should I be setting inside 'use' ? I tried to use a relative path
> to the image - but i'm using an internal image not an external one...

:-)

I suppose that the formatting of the code by the email program has gone
awry!

It should read:
externalGraphic: "marker.png"
//externalGraphic url from attribute url use "${url}"
all in one line, it is a comment.
The meaning of the comment is that you can use the path of an image:
externalGraphic: "marker.png"
or a variable that will be substituted by a value connected to a feature
or a file:
externalGraphic: "${url}"

You can find an example here:
http://docs.openlayers.org/library/feature_styling.html
(Attribute Replacement Syntax)

bye
	maxx



More information about the Users mailing list