RE: [OpenMap Users] General performance hints

From: Dave Brown <dave_at_dbws.net>
Date: Wed, 22 Feb 2006 18:22:22 -0000

Hi..

Thanks for reply. I just customes the SimpleMap demo code.

After tweaking, I used the BufferedMapBean, which dramatically improved
performance.

 

-----Original Message-----
From: Don Dietrick [mailto:dietrick_at_bbn.com]
Sent: 22 February 2006 18:16
To: Dave Brown
Cc: openmap-users_at_bbn.com
Subject: Re: [OpenMap Users] General performance hints

Hi Dave,

How big is your file (or how many features are in it?). When you use the
Shape file version, are you using the ShapeLayer(which re-reads the file
every projection change to only hold the features needed for the map) or
BufferedShapeLayer (which reads the entire file and holds the contents in
memory)? The MIFLayer should have similar performance to the
BufferedShapeLayer, however.

Depending on the number of features in your file and the scales you want to
be able to use the data, you might have to implement some filtering in the
layer to only display the features that make sense at different scales.

- Don

On Feb 22, 2006, at 8:05 AM, Dave Brown wrote:

> Hi All,
>
>
> I was wondering If anyone has general performance advice for using
> openMap.
>
> Just started using it and decided to start off by expanding the
> simplemap
> program.
>
> So all I'm doing is loading my own shapefile, a street map of cairo
> but am
> dissapointed with the delay in display. Each time I either move or
> zoom
> there is a 1-5 second delay.
>
> I've wondered whether it was the shapefile performance, so tried
> MIF but
> there is no difference really.
>
>
> Is there a recommended format or any general tips you can give to
> ensure
> immediate response in the UI.
>
> I'll post my code here just in case anyone can spot any areas I can
> immediately optimise..
>
> Thanks in advance, Dave.
>
> Code :
>
> MapPanel mapPanel = new BasicMapPanel();
> MapHandler mapHandler = mapPanel.getMapHandler();
> mapHandler.add(frame);
> // Get the default MapBean that the BasicMapPanel created.
> MapBean mapBean = mapPanel.getMapBean();
>
> // Set the map's center & scale
> mapBean.setCenter(new LatLonPoint(30.0599f, 31.25f));
> mapBean.setScale(120000f);
>
> mapHandler.add(new LayerHandler());
>
> // ADD MIF Layer
> Properties mifLayerProps = new Properties();
> MIFLayer mifLayer = new MIFLayer();
> mifLayerProps.put("mifFile",
> "C:/Development/supernav/Cairo_Streets.MIF");
> mifLayer.setProperties(mifLayerProps);
> mifLayer.setVisible(true);
> mapHandler.add(mifLayer);
>
> mapHandler.add(new GraticuleLayer());
> //mapHandler.add(routeLayer);
>
> // Create the directional and zoom control tool
> OMToolSet omts = new OMToolSet();
> // Create an OpenMap toolbar
> ToolPanel toolBar = new ToolPanel();
> mapHandler.add(omts);
> mapHandler.add(toolBar);
>
> // Display the frame
> frame.setVisible(true);
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.15.12/266 - Release Date:
> 21/02/2006
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.15.12/266 - Release Date:
> 21/02/2006
>
>
>
> --
> [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"]


-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.12/266 - Release Date: 21/02/2006
 
-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.12/266 - Release Date: 21/02/2006
 
--
[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 Feb 22 2006 - 13:22:48 EST

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