RE: [OpenMap Users] Map Data Access

From: Vincent, Chuck <CVincent_at_sfa.com>
Date: Tue, 5 Jul 2005 11:45:31 -0400

Should this work?

shapeLayerProps.put("shapeFile",
this.getClass().getResource("dcwpo-browse.shp"));
shapeLayerProps.put("spatialIndex",
this.getClass().getResource("dcwpo-browse.ssx"));

 

-----Original Message-----
From: Don Dietrick [mailto:dietrick_at_bbn.com]
Sent: Monday, June 27, 2005 1:24 PM
To: Vincent, Chuck
Cc: openmap-users_at_bbn.com
Subject: Re: [OpenMap Users] Map Data Access

Hi Chuck,

On Jun 27, 2005, at 10:59 AM, Vincent, Chuck wrote:

> I have successfully integrated a mabBean into my Java app, but I need
> help with map data access options.
>
> When I run the app locally and have the data files stored on the
> machine
> everything is good, fast projection changes.
>
> I am also trying to implement a applet version, I changed the
> shapeLayerProps.put() command to access the shapeFile and spatialIndex
> files using "http://path_to_files" and all is well, except projection
> changes are slow.

That's because the ShapeLayer re-reads the data files when the
projection changes, in an effort to hold on to the least amount of
geometries necessary. See more below...

> I have not had success packaging the files in the jar
> file, actually I have them packaged in the jar file, the
> shapeLayerProps.put() method only complains that the file path is
> invalid. I have packaged image files into the jar file and can access
> them with out issue. Is there something I am missing?

You probably have to add the jar file as a resource to load in the
applet html file. In the properties, the file should be referenced
with the path to the file from the root inside the jar.

> The second option is to speed up the projection changes when linked to
> the files via http. Is there a way to cache the files once they are
> read in so future projection changes will be faster?

You can use the BufferedShapeLayer for that.

- Don



--
[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 Tue Jul 05 2005 - 11:46:19 EDT

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