Re: [OpenMap Users] AreaShapeLayer

From: Mohamed Tamer Refaei <mtamer_at_gmail.com>
Date: Thu, 28 May 2009 23:16:09 -0400

Thanks Derek,

I have tried that before but it doesn't
change anything. I still cannot get any colors. I guess what I posted
was an attempt where I used "21.fillColor" instead of
"areas.21.fillColor".

One thing I realized though is that I am not using the latest version
of openmap because some of the methods in the javadocs are not
supported in the version I am using (in particular,
getPoliticalAreas() is not defined for AreaHandler). I am not sure how
to figure out the version I have. Also, I can't upgrade (I've tried to
and a lot of things broke).

Regards

On Thu, May 28, 2009 at 4:25 PM, Melvin, Derek R
<derek.r.melvin_at_lmco.com> wrote:
> 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"]
>



-- 
----------------------------------
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"]
Received on Thu May 28 2009 - 23:16:49 EDT

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