[OpenMap Users] Optimizing Performance

From: Ruben DF <rdocasalf_at_gmail.com>
Date: Fri, 13 May 2011 13:53:40 +0200

   - I'm using BufferedLayerMapBean instead of using by mapBean by default.
   - I'm using a set of layers (some of them are statics, others very active
   layers).
   - The statics layers are taken from openmap.properties and the background
   flag as true.
   - The active layers inherit from OMGraphicHandlerLayer and I'm using this
   code when inits

              setProjectionChangePolicy(new
com.bbn.openmap.layer.policy.StandardPCPolicy(this, true));
              setRenderPolicy(new
com.bbn.openmap.layer.policy.BufferedImageRenderPolicy());

   - I'm using the omGraphicList by default:
      - omlist = layer.prepare();
      - omlist.add(elements);
      - layer.setList(omlist);
   - I have a dedicated thread to paint each 40 ms approx. and I do this:

                 if(omList1!=null){

PanelMapa.omListTraceMovil.generate(PanelMapa.mapPanel.getMapBean().getProjection());
                }

                if(PanelMapa.omListHippodrome!=null){

PanelMapa.omListHippodrome.generate(PanelMapa.mapPanel.getMapBean().getProjection());
                }


   - mapBean.setBufferDirty(true);
      - mapBean.setDoubleBuffered(true);
      - Rectangle r = mapBean.getBounds();//Limits of mapBean
      - mapBean.repaint(r); //In order to paint just what I'm looking in a
      given moment.


--
[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 Fri May 13 2011 - 07:54:33 EDT

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