[OpenMap Users] General performance hints

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

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"]
Received on Wed Feb 22 2006 - 08:27:18 EST

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