Duncan Garratt


Is there a way of adding a label to a map For example a label where the font, font colour, and font size can be specified.

Any help would be most gratefully received.





Re: VELabel Support

Jared H


Hi Duncan -- sounds like the Custom Control implementation will work for you. The msdn documentation is here, and also in the interactive sdk (Show/Hide Controls --> Add a custom control). Hope that helps, thanks.






Re: VELabel Support

Duncan Garratt

The problem with this method is that the custom control is not geo referenced to the map. What I am after is a geo referenced label without having to use an icon which requires an image.

Many thanks for your suggestion, and hopefully there is an answer out there somewhere.







Re: VELabel Support

Earthware

Have a look at the version 5 shape objects. Pushpins (which are now a type of shape) support html text for the icon rather than an image. This allows you to have text labels.

One caution however, the labels appear with the top left of the label being the location of the pushpin, for really long labels this looks odd and I'd prefer the option to center these labels.

Brian Norman

www.earthware.co.uk





Re: VELabel Support

Duncan Garratt

Thank you Brian for your suggestion.

It looks like this could be the answer to the problem.

Can you use a CSS offset in the same way as you can for a marker

Many thanks






Re: VELabel Support

Derek Chan

You can use CSS offset to move the pin icon, but keep in mind the user onmouseover event for the icon pop-up will only work at its original position




Re: VELabel Support

Duncan Garratt

Thank you Derek

Most helpful.






Re: VELabel Support

Duncan Garratt

When I use shape.SetCustomIcon("<div>Test</div>") the text appears as a link, with rollover action attached. What I would like to achieve is a label without appearing as a link and without the rollover action.

Is there anyway of disabling the rollover action, and displaying as straight text

Any help most greatly received.






Re: VELabel Support

Derek Chan

The reason is because there's an anchor tag that's wrapping the <DIV> tag. If you need to get rid of it, you can override the anchor CSS classes to however you'd like it to behave (effectively overriding any anchor tags used throughout the page though)