[OpenMap Users] Location color on locationlayer not working

From: Eric Chatellier <chatellier_at_codelutin.com>
Date: Sun, 04 Dec 2011 23:06:49 +0100

Hi,

I'm using an locationLayer with a custom LocationHandler to
put dynamic objects on a map.

Here is my code :

HaulLocationHandler locationHandler = new HaulLocationHandler(hauls);
haulLocationLayer = new LocationLayer();
haulLocationLayer.setLocationHandlers(new LocationHandler[]{locationHandler});
addMapComponent(haulLocationLayer);

with HaulLocationHandler:

public class HaulLocationHandler extends AbstractLocationHandler {

    public HaulLocationHandler(List<Coordinate> coordinates) {
        this.coordinates = coordinates;
        setLocationColor(Color.GREEN);
        setShowLocations(true);
    }

    _at_Override
    public OMGraphicList get(float nwLat, float nwLon, float seLat, float seLon,
OMGraphicList graphicList) {
            Location location = new BasicLocation(0.0, 0.0, "test", null);
            location.setLocationHandler(this);
            location.setLinePaint(Color.RED);
            location.setShowName(true);
            location.setShowLocation(true);

            graphicList.add(location);

        return graphicList;
    }
}

I can see location diplayed on map, but a can display it
in a different color than default black.

In previous code, "setLocationColor(Color.GREEN);" and
"location.setLinePaint(Color.RED);"
both don't work.

I've different serie of location to display and i would like to have a different
color for each series.

Any clue why color won't work ?

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 Sun Dec 04 2011 - 17:08:52 EST

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