[Dev] Labelled Markers
euzuro at gmail.com
Wed Oct 18 08:42:08 EDT 2006
Your strategy seems pretty good. The trick I think would be to subclass
OpenLayers.Marker, adding a property variable for your label text and
tacking on the relevant code in the draw() and moveto() functions.
On 10/17/06, Andrew Larcombe <andrew at andrewlarcombe.co.uk> wrote:
> I'm greedy. I'd like to display a text label alongside each Icon in my
> Markers layer. Can anyone point me in the right direction to implement
> this sort of scheme.
> My initial thought was of creating a separate Label class, similar to
> the Icon class, which just creates a div, and a <p> child node
> containign the text for the label, then including one of these Label
> objects within the Marker class. Anyone have any comments/pitfalls on
> this approach, or is it just daft?
> Andrew Larcombe
> Freelance Geospatial, Database & Web Programming
> web: http://www.andrewlarcombe.co.uk
> email: andrew at andrewlarcombe.co.uk
> icq: 306690163
> Dev mailing list
> Dev at openlayers.org
More information about the Dev