Re: [OpenMap Users] Questions on ImageTileLayer

From: Adams Tan <nikida78_at_gmail.com>
Date: Mon, 28 Sep 2009 09:18:13 +0800

Hi Don, thanks for the prompt reply.
So i can assume with a max cache size of X, at any one time, only X tiles
are kept in mem (with the rest unloaded and waiting for GC)? In that case,
is there a reason for the partial loading behavior?

On the other hand, I was looking through the code and I noticed
getBufferedImage was called twice (once when the small squares will loading
up, once when i zoom in enough for the images to be displayed). Do you think
this accounts for the initial delay. In that case, wouldn't all the images
be already loaded in memory (thought not displayed) once I set the layer to
be visible.

Adams

On Sun, Sep 27, 2009 at 10:49 PM, Don Dietrick <dietrick_at_bbn.com> wrote:

> Hi Adams,
>
> The intention of the code is that the images shouldn't be loaded in to
> memory until they need to be viewed. As far as I can tell, the delay you
> are seeing is the JAI code running through the file finding the geospatial
> tags, trying to find out where the images go. I have some tiles (similar
> sizes) that are handled really quickly, and others that are pretty slow. I
> haven't been able to find out what the difference between the two files are,
> or what JAI is doing differently for those slower files.
>
> I haven't noticed an issue with the scale settings, I'll take a look at it,
> though.
>
> - Don
>
>
>
>
> On Sep 27, 2009, at 6:52 AM, Adams Tan wrote:
>
> Hi all,
>>
>> I have been playing around with ImageTileLayer and I noticed once I set
>> the layer to be visible, it will take quite a while (assuming I have a huge
>> 30MB png sliced into 300 tiles, about 100KB per slice) where I will see
>> small boxes appearing one by one. At this stage, does the images already get
>> loaded into the memory heap? If not, why would this process take so long? I
>> assume that the images are only loaded (on demand) when the current scale
>> matches the cut-off scale specified, hence, this long delay seems
>> unnecessary.
>> cale goes lower than what I specified in the cut-off scale,
>>
>> Another issue that I noticed is the cut off scale does not seems to make
>> much diff on when the image is actually displayed (pre-loaded or not, i'm
>> not sure). A setting of 100,000 (default) and 1,000,000 does not seems to
>> affect when each images are displayed. Often I see partial display of tiles
>> even though i set the cache size to 50. Sometimes I count the number of
>> squares and they are lower than the cache size that I set. Shouldn't all the
>> tiles in the current map view be displayed as long as they are below my
>> specified cache size?
>>
>> Thanks,
>> Adams
>>
>
>


--
[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 Sun Sep 27 2009 - 21:18:51 EDT

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