Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-13 Thread gioza
As suggested by Armin, I modified PM.Layer.PMap.js file in this way:

substitute lines 135->137 with the following ones (copied from highlights)

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

Now PMap layers are always updated. Just activate/disactivate the layer you
will appreciate the modifications if they occured.
A function like this:

trigger: function myRefreshMap(){   
map.layers[3].clearGrid();  
map.layers[3].redraw(true);
},

will force the update in the "current zoom extent/view";

Looking in the "PM.Layer.PMap.js" file I found out the parameter which rules
the "opacity" of highlights (not manageable from template.map file): line
148





--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025707.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-09 Thread Armin Burger
you could also just have it easy, and if you want layers without any 
caching, use the non-tiled ("PMap") type

or add a timestamp KVP at the end of each x/y/z request URL, as it's 
done for the highlight layer.




On 12/09/2014 10:50 AM, gioza wrote:
>   this function seems to do the job (partially). I have to do more tests
> because it works only after a "pan"
>
> trigger: function myRefreshMap(){
>  if (this.map) {
>   map.layers[4].clearGrid();
>   map.layers[4].redraw(true);
>   
>  }
>
> },
>
> clearGrid deletes the cache for layer[4]
>
>
>
>
>
> --
> View this message in context: 
> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025705.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list 
> archive at Nabble.com.
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> ___
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-09 Thread gioza
 this function seems to do the job (partially). I have to do more tests
because it works only after a "pan"

trigger: function myRefreshMap(){
if (this.map) {
map.layers[4].clearGrid();
map.layers[4].redraw(true);
   
   }
   
},

clearGrid deletes the cache for layer[4]





--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025705.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-06 Thread gioza
The only way it works for is to set "session_cache_limiter('nocache')" in
index.php and comment the following line. Obviously the effect can be
appreciated after a reaload, not during a live session (not completly true).

The function map.layers[i].redraw(true) isn't useful, I would try with a 
map.layers[i].destroy() followed by map.addlayer[i].
Destroy function works, it deletes the oltheme refering to the order
specified by the [i].

I think that caching shouldn't be set off because it improves browising
performance for user. In my opinion the right way is to decide which layer
can be refreshed (ex.: editable layer...).
I am working on it, I let you know.

any ideas?

Giovanni 




--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025704.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-02 Thread Armin Burger
you don't have caching on non-tiled layers, unless the URL for the layer 
image is 100% identical. Not that likely if you consider map extent 
coordinates for requests having 6 or more decimals for each corner 
coordinate pair...


On 12/02/2014 10:01 PM, gioza wrote:
> Hi Armin,
> if I understood the modifications you suggested have effect on cache
> lifetime. I have to do more tries to understand why it doesn't work for me
> (I have cache also with PMap setting).
> By the way a layer changement (symbology, contents...) won't be appreciate
> during a live-session, i think.
> I tried with  redraw function but with no success obviously because it
> redraws something in the cache...
>
>
>
>
> --
> View this message in context: 
> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025702.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list 
> archive at Nabble.com.
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> ___
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-02 Thread gioza
Hi Armin,
if I understood the modifications you suggested have effect on cache
lifetime. I have to do more tries to understand why it doesn't work for me
(I have cache also with PMap setting).
By the way a layer changement (symbology, contents...) won't be appreciate
during a live-session, i think.
I tried with  redraw function but with no success obviously because it
redraws something in the cache...




--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025702.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-02 Thread gioza
I seems to produce effect if I reload the webgis service but not in the live
session.
(both php file with "1" as value)



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025697.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-02 Thread Armin Burger

   make sure that you emptied the browser cache before since tiles loaded
   before that change have still the old expiration time.

   If it doesn't help either try to set
   in [1]lib/[2]map/[3]pmtile/[4]index.php line 4 to
 session_cache_expire(1);

   armin

   Gesendet: Dienstag, 02. Dezember 2014 um 09:28 Uhr
   Von: gioza 
   An: pmapper-users@lists.sourceforge.net
   Betreff: Re: [pmapper-users] Pmapper5: refresh a layer
   Hi Armin,
   i tried with a shapefile (modify in qgis and show in pmapper) but with no
   success. I modified also theindex.php file .
   I am going to have more tries I let you khow.
   Thanks,
   Giovanni
   --
   View this message in context:
   [5]http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pma
   pper5-refresh-a-layer-tp4025689p4025693.html
   Sent from the pmapper-users -- p.mapper users mailing list mailing list
   archive at Nabble.com.
   
   --
   Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
   from Actuate! Instantly Supercharge Your Business Reports and Dashboards
   with Interactivity, Sharing, Native Excel Exports, App Integration & more
   Get technology previously reserved for billion-dollar corporations, FREE
   [6]http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clk
   trk
   ___
   pmapper-users mailing list
   pmapper-users@lists.sourceforge.net
   [7]https://lists.sourceforge.net/lists/listinfo/pmapper-users

References

   1. http://svn.pmapper.net/trac/browser/trunk/pmapper5/lib
   2. http://svn.pmapper.net/trac/browser/trunk/pmapper5/lib/map
   3. http://svn.pmapper.net/trac/browser/trunk/pmapper5/lib/map/pmtile
   4. 
http://svn.pmapper.net/trac/browser/trunk/pmapper5/lib/map/pmtile/index.php
   5. 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025693.html
   6. 
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
   7. https://lists.sourceforge.net/lists/listinfo/pmapper-users
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-02 Thread gioza
Hi Armin,
i tried with a shapefile (modify in qgis and show in pmapper) but with no
success. I modified also theindex.php file .
I am going to have more tries I let you khow.
Thanks,

Giovanni



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689p4025693.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-01 Thread Armin Burger
could you give it a try and change in lib/map/pmtile/maptile.php
line 55 to

   $offset = 1;

I'm not sure if it's this value or the one from the index.php file for 
"session_cache_expire" that defines effectively the cache expiration.

In the case the offset value works I will add some small modifications 
to allow setting default global values via the config or for single 
layers individually.

armin


On 12/01/2014 10:17 AM, gioza wrote:
> Pmapper5 has a great property which is the client-side caching so users can
> browse very fast in the map!
> Sometimes it is useful to refresh a layer (after editing or because a layer
> contents are changed for any reason).
> I tried with a new control function in this way:
>
>   map.layers[4].redraw(true );
>   map.layers[5].redraw(true );
>
> but with no results. The layers just flashed but remain the same.
> Any idea?
>
>
>
>
> --
> View this message in context: 
> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list 
> archive at Nabble.com.
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


Re: [pmapper-users] Pmapper5: refresh a layer

2014-12-01 Thread Armin Burger
tiled layers are cached by the browser (which is the main advantage 
towards non-tiled ones...). In case of changes to the data or map file 
(symbols etc) you need to empty the browser cache. I have to check iof 
there is a config setting for defining the cache policy (expiration time 
of tiles) for testing.

Alternatively don't use layer/theme type PMTile but PMap which will 
always refresh the map image for this layer/theme.

armin


On 12/01/2014 10:17 AM, gioza wrote:
> Pmapper5 has a great property which is the client-side caching so users can
> browse very fast in the map!
> Sometimes it is useful to refresh a layer (after editing or because a layer
> contents are changed for any reason).
> I tried with a new control function in this way:
>
>   map.layers[4].redraw(true );
>   map.layers[5].redraw(true );
>
> but with no results. The layers just flashed but remain the same.
> Any idea?
>
>
>
>
> --
> View this message in context: 
> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-refresh-a-layer-tp4025689.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list 
> archive at Nabble.com.
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users