[OpenMap Users] having trouble changing properties for individual points

From: Newbie1906 <wrwashington_at_fedex.com>
Date: Wed, 15 Jul 2009 08:57:23 -0700 (PDT)

Hello,
I am attempting to render specific points (zip code centroids), and hide the
rest of the points, in a shapefile by using the code below. I have been
successful doing this using the AreaShapeLayer class when dealing with
polys, but I have not found a way to reference the individual points in the
point shapefile when using the ShapeLayer class.

The code below will result in all points in the shapefile being rendered.
All of the shapefiles are referenced in a properties file on the local
server.

Is there a way to reference individual elements of my point shapefile?
Should I be using a different class to render OMPoints?

Please advise.

Attempt to draw OMPoints (displays all points on map)
---------------------------------------------
               
omProps.put("zippoints.class","com.bbn.openmap.layer.shape.ShapeLayer");
                omProps.put("zippoints.prettyName","Zip Points");
               
omProps.put("zippoints.shapeFile",appProps.getProperty("zippointshapefile"));
               
omProps.put("zippoints.spatialIndex",appProps.getProperty("zippointindexfile"));
               
omProps.put("zippoints.dbfFile",appProps.getProperty("zippointdbffile"));
                omProps.put("zippoints.lineColor","88000000");
                omProps.put("zippoints.fillColor","88000000");
                omProps.put("zippoints.lineWidth","0");
                omProps.put("zippoints.keyIndex","0"); // "terminal" field
in shapefile
                omProps.put("zippoints.nameIndex","0"); // "terminal" field
in shapefile
                omProps.put("zippoints.pointOval","true"); // "terminal"
field in shapefile
                omProps.put("zippoints.pointRadius","1"); // "terminal"
field in shapefile




Working method for polygons using the AreaShapeLayer
-------------------------------
               
omProps.put("legend.class","com.bbn.openmap.layer.shape.areas.AreaShapeLayer");
               
omProps.put("legend.shapeFile",appProps.getProperty("legendshapefile"));
               
omProps.put("legend.dbfFile",appProps.getProperty("legenddbffile"));
                omProps.put("legend.lineColor","00000000");
                omProps.put("legend.fillColor","00000000");
                omProps.put("legend.keyIndex","1"); // "Symbol" field in
shapefile
                omProps.put("legend.nameIndex","1"); // "Symbol" field in
shapefile
                // show zones 1 through 5 in the legend for ground transit
map
                omProps.put("legend.areas","1 2 3 4 5");
                omProps.put("legend.areas.1.fillColor", (String)
omProps.get((String) colors.get("1")));
                omProps.put("legend.areas.2.fillColor", (String)
omProps.get((String) colors.get("2")));
                omProps.put("legend.areas.3.fillColor", (String)
omProps.get((String) colors.get("3")));
                omProps.put("legend.areas.4.fillColor", (String)
omProps.get((String) colors.get("4")));
                omProps.put("legend.areas.5.fillColor", (String)
omProps.get((String) colors.get("5")));

-- 
View this message in context: http://www.nabble.com/having-trouble-changing-properties-for-individual-points-tp24500920p24500920.html
Sent from the OpenMap mailing list archive at Nabble.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 Wed Jul 15 2009 - 11:57:46 EDT

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