Thanks Michael.
I've had a play around with it but am having no luck.
I tried changing it so that rather than create a new BufferedImage
each time, it instead calls the currently unused clearBaseImage()
method:
if(baseImage != null && baseImageGraphics !=
null) {
this.clearBaseImage();
}else {
baseImage = new
BufferedImage(curPaintArea.width + 1, curPaintArea.height + 1,
BufferedImage.TYPE_INT_ARGB);
baseImageGraphics =
baseImage.createGraphics();
}
I have left the onRenderingComplete method the same, as it seems this
only paints the area, and doesn't first clear it. I've also played
around with different combinations and had no luck whatsoever.
This still results in the entire map getting cleared and repainted
every time something changes in one of the layers, or a zoom/pan is
performed. This makes everything really jerky, especially when one of
the layers is constantly changing, in order to produce an animation.
Does anyone have any suggestions for making this smoother?
Regards,
Dave
On Wed, Apr 20, 2011 at 3:49 PM, mbedward [via OSGeo.org]
<[email protected]> wrote:
> Hello Dave,
>
> You'll want to modify the JMapPane.paintComponent method, and possibly
> also the onRenderingCompleted method.
>
> Hope this helps,
> Michael
>
>
> On 20 April 2011 15:30, dscerri <[hidden email]> wrote:
>> Hi,
>>
>> I am using the imagemosaic-jdbc plugin, with some large image files which
>> are being displayed in a JMapPane. I have noticed that when repainting is
>> required (due to resizing etc) the rendering seems to follow this process:
>>
>> (I haven't been able to locate this process in the code, so its purely
>> speculation based on experimentation.)
>> 1. Clear dirty area of screen
>> 2. Submit request to DB in a separate thread
>> 3. When request is returned, paint the cleared area of screen.
>>
>> This means that when the request takes a non-trivial amount of time, the
>> map
>> pane changes to white for a period and then back to the image. IMO, it
>> would
>> be better to not clear the dirty area until the new image is ready to be
>> painted, so there would not be a white period.
>>
>> Is this possible to implement? Is my guessing of how the rendering is done
>> correct? Could someone point me to the appropriate code so I can at least
>> implement this for my own purposes?
>>
>> Thanks very much for your help, it is much appreciated.
>>
>> Regards,
>>
>> Dave
>>
>> --
>> View this message in context:
>> http://osgeo-org.1803224.n2.nabble.com/JMapPane-gets-cleared-too-early-tp6289668p6289668.html
>> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Benefiting from Server Virtualization: Beyond Initial Workload
>> Consolidation -- Increasing the use of server virtualization is a top
>> priority.Virtualization can reduce costs, simplify management, and improve
>> application availability and disaster protection. Learn more about
>> boosting
>> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://osgeo-org.1803224.n2.nabble.com/JMapPane-gets-cleared-too-early-tp6289668p6289688.html
> To unsubscribe from JMapPane gets cleared too early?, click here.
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/JMapPane-gets-cleared-too-early-tp6289668p6311976.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users