Re: Question about why my point data shapefile does not display

From: Donald Dietrick <dietrick@bbn.com>
Date: Thu Oct 25 2001 - 15:50:30 EDT

Hi Brian,

Points are supported in the ShapeLayer. I just tried this out with an
airport file, and the dots came up on my map.

In the properties file, you can also define a property:

bridges.pointImageURL=<URL to image file>

That will put the image (icon) over every spot.

I'm not sure why the points wouldn't be showing up for you. The
properties look OK. I can test out your file if you want to send it to
me.

- Don

On Thursday, October 25, 2001, at 01:03 PM, Dealy, Brian wrote:

> Hi,
>
> I am new to openmap. I have two shapefiles.
> one is california counties, the other is bridge data for within the
> state.
>
> I have been able to display both shapefiles using arcexplorer so I
> believe
> the files to be OK.
>
> I have only been able to display the california counties in my java
> application using openmap and using
> the openmap viewer. The viewer sees both layers from the properties
> files
> because
> when I click the edit layers part, they are listed and it tries to
> redraw
> both but only
> gets the boundary lines, does not display the point data.
>
> I will post code below:
> My question is: is point data different somehow in that it can't use the
> same shapelayer?
>
> I added the ssx files using the SpatialIndex class as documented....
>
> here is how I described them in the properties files
> # Layers listed here appear on the Map in the order of their names.
> openmap.layers=bridges CAcounties date drawing quake daynight test
> graticule
> demo shapePolitical
>
> ### Layer used by the bridges handler
> bridges.class=com.bbn.openmap.layer.shape.ShapeLayer
> bridges.prettyName=Bridges
> bridges.shapeFile=data/shape/st_br.shp
> bridges.spatialIndex=data/shape/st_br.ssx
> bridges.lineColor=ff000000
> bridges.fillColor=ffbdde83
>
> ### Layer used by the california counties handler
> CAcounties.class=com.bbn.openmap.layer.shape.ShapeLayer
> CAcounties.prettyName=Counties
> CAcounties.shapeFile=data/shape/california_counties.shp
> CAcounties.spatialIndex=data/shape/california_counties.ssx
> CAcounties.lineColor=ff000000
> CAcounties.fillColor=ffbdde83
>
>
> I suspect my code is not the problem because I get the same result from
> the
> viewer using the same properties file.
>
> Any Help Appreciated! This is a nice package. I was amazed I could get
> so
> far so quickly...

That's nice to hear.

> thanks
> Brian
>
>
> OK, just in case someone wants to see my relevant code....
> // add the bridge layer
> ShapeLayer shapeLayer = new ShapeLayer();
> Properties shapeLayerProps = new Properties();
> shapeLayerProps.put("bridges.prettyName", "California Bridges");
> shapeLayerProps.put("bridges.lineColor", "FFFF00");
> shapeLayerProps.put("bridges.fillColor", "BDDE83");
> shapeLayerProps.put("bridges.shapeFile", "st_br.shp");
> shapeLayerProps.put("bridges.spatialIndex", "st_br.ssx");
> shapeLayer.setProperties("bridges", shapeLayerProps);
>
> // add the county outlines layer
>
> ShapeLayer shapeLayer2 = new ShapeLayer();
> Properties shapeLayerProps2 = new Properties();
> shapeLayerProps2.put("CAcounties.prettyName", "California
> Boundaries");
> shapeLayerProps2.put("CAcounties.lineColor", "00FFFF");
> shapeLayerProps2.put("CAcounties.fillColor", "333333");
> shapeLayerProps2.put("CAcounties.shapeFile",
> "california_counties.shp");
> shapeLayerProps2.put("CAcounties.spatialIndex",
> "california_counties.ssx");
> shapeLayer2.setProperties("CAcounties", shapeLayerProps2);
>
> // Create required layers
> Layer layers[] = new Layer[3];
> layers[0] = shapeLayer;
> layers[1] = new GraticuleLayer();
> layers[2] = shapeLayer2;
> // create LayerHandler with newly created layers
> LayerHandler layerHandler = new LayerHandler(layers);
>
> // Let the LayerHandler know who is interested in Layers.
> //MapBean is just one component
> layerHandler.addLayerListener(mapBean);
>
> // Create the directional and zoom control tool
> OMToolSet omts = new OMToolSet();
>
> // Associate the tool with the map
> omts.setupListeners(mapBean);
>
> // Create an OpenMap toolbar
> ToolPanel toolBar = new ToolPanel();
>
> // Add the tool to the toolbar
> toolBar.add(omts);
>
> // Add the tool bar to the frame
> this.getContentPane().add(toolBar, BorderLayout.NORTH);
>
> // Add the map to the frame
> this.getContentPane().add(mapBean, BorderLayout.CENTER);
>
>
>
> Brian Dealy
> Vice President for Technology, Group Chief Technologist,
> SAIC Technology Applications and Analyses Group
> 9455 Towne Centre Drive, San Diego, CA 92121
> (858) 826-4457 email brian.dealy@saic.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"]
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Thu Oct 25 15:52:42 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT