[pmapper-users] Tile caching support in p.mapper 5

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[pmapper-users] Tile caching support in p.mapper 5

Armin Burger-2
Dear all

In case of interest, I added a simple solution for on-disk tile caching
for tiled layers in pm5. It only requires enough disk space for the
cache image tiles and a few config parameters.

It's mainly useful for large datasets that shall be displayed at lower
zoom levels but have too many details to be rendered acceptably fast at
lower zoom levels. Could be vector layers with a lot of details or
raster layers with lots of single files to be read.

The advantage to a fully-fledged tile cache solution (like MapCache) is
that it does not require additional service set-ups. And in case of
vector layers it also supports legend icons (and printing, once it is
fully working...).

If you want to try, see changesets 1372 and 1375 for the files to be
updated from svn trunk. Config parameters are listed here:
http://svn.pmapper.net/trac/wiki/XmlFileSettingsFive?action=diff&version=12

could look like
<category name="cat_admin" imgFormat="png32" olTheme="admin" buffer="0"
themeType="PMTile" tileCache="true" cacheMaxLevel="12">

and needs under <map> an entry like
   <tileCacheRoot>/path/to/pmapper_tilecache/default</tileCacheRoot>


A corresponding basic seeding functionality is currently in test.
Out-dated tile files, e.g. due to changes in symbology, need to removed
manually in the directory of the tile cache. But the Unix "find" command
allows a quite comprehensive functionality for this.

Regards
/A

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
pmapper-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/pmapper-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tile caching support in p.mapper 5

gioza
I will try right now!
Great job Armin!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tile caching support in p.mapper 5

gioza
This post was updated on .
it works! great!
Is it possible to "manage" cache/no cache for layers in the xml file?
I mean, if I woulk like to have a layer always updated as You told me in another post I have to modify the url request in PM.Layer.Pmap.js  with timestamp as follow:


getUrlParamsAdditional: function() {
        var now = parseInt(new Date().getTime() / 100);
        return '×tamp=' + now;
    },

It could be nice to manage this option via xml file, I think, otherwise all layers (only in Pmap type theme) will be managed in the same way.
Bye,
Giovanni
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tile caching support in p.mapper 5

gioza
In reply to this post by Armin Burger-2
hi armin,
is "<tileCacheExpiration>" in config.xml mandatory?
thanks,

Giovanni
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tile caching support in p.mapper 5

gioza
In reply to this post by Armin Burger-2
Hi Armin,
I have seen from svn trunk changeset 1377 which should prevent caching possibility for layers.
How does it work? Have I to set any parameters in xml file?
Does it work independently of tilecaching system?
Thank you very much,
Giovanni
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tile caching support in p.mapper 5

Armin Burger-2
you add a tag preventCaching="true" in the config XML file.

I don't think it prevents caching for layers where you have a
server-based tile-caching activated. Would also not make much sense to
first say "use cache", and then say "no, don't use it"...

I just added the "cache prevention" function in general to non-tiled
layers even though there is practically no caching happening, except in
a conceivable case where you might have dynamic layers defined. But it
was simple to implement using the same function as for the layer used
for result highlighting, so I added it.

For the same reason I added that function then to tiled layers as well,
even though I find it plainly useless to use tiled layers whose main
advantage is the caching (at least in the browser) and then find a way
to avoid exactly that...

/a

On 04/07/2015 12:33 PM, gioza wrote:

> Hi Armin,
> I have seen from svn trunk changeset 1377 which should prevent caching
> possibility for layers.
> How does it work? Have I to set any parameters in xml file?
> Does it work independently of tilecaching system?
> Thank you very much,
> Giovanni
>
>
>
> --
> View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-Tile-caching-support-in-p-mapper-5-tp4025722p4025744.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> pmapper-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
pmapper-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/pmapper-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tile caching support in p.mapper 5

gioza
thanks.
I agree you. My aim was to prevent caching just for one or two non-tiled layers, so to define them in the config file.
As you said the main advantage of tiling  is the caching sytem and your last implementations are really excellent!

hi,
Giovanni
Loading...