Hi Tamer,
You are on the right track but I think that you have a syntax error.
Looking at the javadoc...
Instead of this:
aslLayerProps.put("21.fillcolor", "ffCCCCCC");
Try this:
aslLayerProps.put("areas.21.fillColor", "ffCCCCCC");
Thanks
Derek Melvin
-----Original Message-----
From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-users_at_bbn.com]
On Behalf Of Mohamed Tamer Refaei
Sent: Thursday, May 28, 2009 1:57 PM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] AreaShapeLayer
I have a landuse shape file for one of the US states that I am trying to
display in OPENMAP and color each are differently. I have a .shp file
and I created a .csv file out of a .dbf file that came along with the
.shp file. The code I am using is shown below:
AreaShapeLayer aslLayer = new AreaShapeLayer();
Properties aslLayerProps = new Properties();
aslLayerProps.put("prettyName", layer_name);
aslLayerProps.put("lineColor", "ff000000");
aslLayerProps.put("fillColor", "00000000");
aslLayerProps.put("csvFile", "h.csv");
aslLayerProps.put("shapeFile", "h.shp");
aslLayerProps.put("keyIndex", 1);
aslLayerProps.put("nameIndex", 1);
aslLayerProps.put("csvFileHasHeader", "false");
aslLayerProps.put("areas", 21);
aslLayerProps.put("21.fillcolor", "ffCCCCCC");
aslLayer.setProperties(aslLayerProps);
.
.
.
and then I add the layer to a
LayerHandler.
The first few lines of the .csv file is shown below:
,43,
,42,
,21,
,43,
,43,
,43,
,43,
,21,
,42,
,11,
,12,
,11,
The shape file is dispalyed correctly but it is not colored at all.
I appreciate any help with the issue.
Regards
--
----------------------------------
Tamer Refaei
--
[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"]
--
[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 Thu May 28 2009 - 16:26:05 EDT