Re: [OpenMap Users] Location color on locationlayer not working

From: Eric Chatellier <chatellier_at_codelutin.com>
Date: Tue, 06 Dec 2011 18:22:28 +0100

Le 05/12/2011 23:08, Don Dietrick a écrit :
> Hi Eric,
>
> There's a bit of a disconnect here, it might be a flaw in the design
> of the BasicLocation object. Location objects extend from
> OMGraphicAdapter, which means they can be managed by a LocationHandler
> or OMGraphicHandlerLayer like any OMGraphic. They really are a
> container for two other OMGraphics, a marker and a label. You can ask
> the Location for the marker or the label and set the colors on those
> parts individually. You could argue that calling setColor/setPaint on
> the Location should call that method on the marker and the label, and
> I'd probably agree, but it doesn't right now. So that explains why
> the Color.RED setting isn't taking hold.
>
> For when you set the line color to Green, the setLineColor() method
> there is setting the value on a DrawingAttributes object being held
> for you for when you respond to the get method call. You can set all
> the different rendering attributes on that DrawingAttributes object,
> and then in get() make this call:
>
> locationDrawingAttributes.setTo(location.getLocationMarker());
>
Ok, thanks you for the precisions.

The code "location.getLocationMarker().setLinePaint(color)" works fine.

Regards.

-- 
Éric Chatellier <chatellier_at_codelutin.com>
Tel: 02.40.50.29.28
http://www.codelutin.com
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Dec 06 2011 - 12:29:21 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT