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);
}
@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@codelutin.com> Tel: 02.40.50.29.28 http://www.codelutin.com -- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Sun Dec 4 17:13:18 2011
This archive was generated by hypermail 2.1.8 : Sun Dec 04 2011 - 17:13:18 EST