Tilcache in pmapper5?

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

Tilcache in pmapper5?

gioza
Hi all,
As Pmapper5 integrates openlayers, theoretically, I think, it's possible to use WMS-C service like Tilecache (metacarta). Any ideas?
Thanks
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tilcache in pmapper5?

gioza
This post was updated on .
I'm trying to make tilecache working with pmapper5.
My aim is to integrate a code that let "openlayers" render the wms tile-service created by tilecache.
Great performance for raster rendering...
My first steps:

1) substitute openlayers single file with version 2.12 (only this version work for me)
2) substitute pm.ol.customized  with the one in the "pmapper5 truck"

As I am not a software developper I tried to "feed" openlayers directly working in the "pm.ol.theme.js" file.
I simply add a new part of code in this way:

addBASETHEME: function() {    
var osm_base= new OpenLayers.Layer.Google("Google street",{
        visibility: false
    });

var ol_wms = new OpenLayers.Layer.WMS( "Cached Base Map",
                    "http://localhost:8080/cgi-bin/tilecache211/tilecache.cgi?",
                                      {LAYERS : "google-tiles"},{ sphericalMercator: true,projection: EPSG:900913"}   );
               
 map.addLayers([ ol_wms ]); },

at line 29 I added this code:
this.addBASETHEME();
Before this part of code:
this.getThemeList();              
this.addThemesToMap();
this.addHighlightTheme();

First results:

Tilecache is on pmapper5 as a fix layer.

Anyone insterested in developping pmapper5 in this direction? I think wms-c service is a great improvement for pmapper5, especially when raster background is requested!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

Armin Burger-2
One small part regarding layers that was planned but never implemented
is a kind of OL native type. Meaning layer creation of whatever type
using only OL standard functions defined by users via customized code
that are then added to the map in the order how they are defined in the
config files. Since there is an abundance of OL layer types with very
different definitions it's not possible to define them via a
configuration file.

I will have a bit a look how it can be easily achieved. The idea is to
use a custom JS file that creates all required OL layer objects and add
them to a list, from where they are taken and added to the map in the
order and groups they are set in the config files.

armin



On 11/12/2014 05:24 PM, gioza wrote:

> I'm trying to make tilecache working with pmapper5.
> My aim is to integrate a code that let "openlayers" render the wms
> tile-service created by tilecache.
> Great performance for raster rendering...
> My first steps:
>
> 1) substitute openlayers single file with version 2.12 (only this version
> work for me)
> 2) substitute pm.ol.customized  with the one in the "pmapper5 truck"
>
> As I am not a software developper I tried to "feed" openlayers directly
> working in the "pm.ol.theme.js" file.
> I simply add a new part of code in this way:
>
> addBASETHEME: function() {
> var osm_base= new OpenLayers.Layer.Google("Google street",{
>          visibility: false
>      });
>
> var ol_wms = new OpenLayers.Layer.WMS( "Cached Base Map",
>
> "http://localhost:8080/cgi-bin/tilecache211/tilecache.cgi?",
>                                        {LAYERS : "google-tiles"},{
> sphericalMercator: true,projection: EPSG:900913"}   );
>
>   map.addLayers([ ol_wms ]); },
>
> at line 29 I added this code:
> this.addBASETHEME();
> Before this part of code:
> this.getThemeList();
> this.addThemesToMap();
> this.addHighlightTheme();
>
> First results:
>
> Tilecache is on pmapper5 as a fix layer.
>
> Anyone insterested in developping pmapper5 in this direction? I this wms-c
> service is a great improvement for pmapper5, especially when raster
> background is requested!
>
>
>
> --
> View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Tilcache-in-pmapper5-tp4025488p4025663.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________
> pmapper-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
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] Tilcache in pmapper5?

gioza
Hi Armin,
I think it would be a great improvement. I am  trying to get it with a workaround as I described in the post above but it isn't a good way, i khow.
in my opinion to use tms or wmsc service directly from ol will make pmapper5 perfect.
Giovanni
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

Armin Burger-2
I added a basic support for native OL layer types. See changeset
   http://svn.pmapper.net/trac/changeset/1359

should work when called the application with "?config=dev" since all of
that new type is defined in the "dev" configuration.

The custom.js needs to create and reference the native layers inside the
block
   $.extend(PM.OL.Theme.olNativeThemes,
   {
       
   });

check also the dev XML config file for "vmapLayerWms", layer type needs
to be specified as "olnative". Currently it uses a WMS, I tested it also
with an XYZ layer, TMS & WMTS should work as well.

Note however that some cross checks are still missing, so all
definitions in XML and the custom.js must be consistent and congruent,
otherwise you will get some Javascript errors.

In addition, all those definitions should be described in the wiki, but
so far nobody wanted to update and extend it for p.mapper 5...

armin


On 11/12/2014 09:08 PM, gioza wrote:

> Hi Armin,
> I think it would be a great improvement. I am  trying to get it with a
> workaround as I described in the post above but it isn't a good way, i khow.
> in my opinion to use tms or wmsc service directly from ol will make pmapper5
> perfect.
> Giovanni
>
>
>
> --
> View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Tilcache-in-pmapper5-tp4025488p4025665.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________
> pmapper-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
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] Tilcache in pmapper5?

gioza
I am going to test it right now.
As far as the wiki page is concerned I am interested to update it...someone may let me khow how to do it...sorry
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

gioza
In reply to this post by Armin Burger-2
It works! excellent work Armin!
If it could help I post my configuration:

Openlayers 2.12 (single file)
pm.ol.customized.js in the truck

My tilecache configuration:

[google-tiles]
type=WMS
url=http://localhost:8080/cgi-bin/mapserv.exe?map=C:\ms4w\apps\esempio\config\default\wms_google.map
layers=catasto
spherical_mercator=true

My custom.js ol:
$.extend(PM.OL.Theme.olNativeThemes,
{
    create: function() {        
        this.themeList['vmapLayerWms'] = this.createVmapWmsLayer();
    },
    createVmapWmsLayer: function() {
        var vmapLayerWms = new OpenLayers.Layer.WMS( "Openlayers WMS",
                                      "http://localhost:8080/cgi-bin/tilecache211/tilecache.cgi?",
                                      {LAYERS : "google-tiles"},{ sphericalMercator: true,  projection: EPSG:900913"}  );
 return vmapLayerWms;
    }
});

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

Re: [pmapper-users] Tilcache in pmapper5?

gioza
This post was updated on .
Some informations may help:

1) in my tests Openlayers 2.11 doesn't work with tilecache (by metacarta - tilecache.org); version 2.11 is the one integrate in pmapper5;
2) changing it with OL 2.12 (single file) and change pm.ol.customized.js with the one in the truck (http://svn.pmapper.net/trac/browser/trunk/pmapper5) make tilecache works;
3) the illustated configuration create problems with Ol controls (the ones in left side of the map) - if you click on them;
4) I realised some problem in android systems, I'm testing it;
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

Armin Burger-2
The OL version currently used in p.mapper 5 is 2.13.1

I would recommend to just use an export from pmapper5 svn trunk, not any
old beta version...




On 11/15/2014 11:14 AM, gioza wrote:

> Some informations may help:
>
> 1) in my tests Openlayers 2.11 doesn't work with tilecache (by metacarta -
> tilecache.org); version 2.11 is the one integrate in pmapper5;
> 2) changing it with OL 2.12 (single file) and change pm.ol.customized.js
> with the one in the truck
> (http://svn.pmapper.net/trac/browser/trunk/pmapper5) make tilecache works;
> 3) Ol controls (the ones in left side of the map) don't work if you click on
> them;
> 4) I realised some problem in android systems, I'm testing it;
>
>
>
>
> --
> View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Tilcache-in-pmapper5-tp4025488p4025671.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________
> pmapper-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
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] Tilcache in pmapper5?

gioza
You are right, but in my tests I had bad experience with OL 2.13.1.
I realised poor performance of Zoom function/rendering with vector features on google base layer.
I think this is a OL 2.13.1 issue (http://osgeo-org.1560.x6.nabble.com/HELP-OL-2-13-Google-v3-and-other-layers-not-zooming-quot-together-quot-td5060658.html).

OL 2.12 work well with tilecache (tilecache.org), 2.11 not. With OL 2.12 and 2.13 in pmapper5 the +/- and nav buttons of olcontrol (the one on the left side) don't work.

With OL 2.12 in pmapper5 I verified that if the default layer is in tiles mode, in IE11 some tiles are missed and become visible only zooming.







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

Re: [pmapper-users] Tilcache in pmapper5?

Armin Burger-2
you're right, OL 2.13 seems to have some strange performance issues, or
"sticky" behaviours... Deactivating a layer for example took several
seconds with 2.13.1 which I noticed just recently, and didn't know
why... on 2.12 it was fine again and happened immediately as was with
2.11. So I changed OL on svn trunk from 2.13.1. back to 2.12.

The + and - buttons I've seen, I'm not sure if it can be related to the
usage inside p.mapper, with transparent bg, etc

I cannot say anything for IE11 though since I don't have it... does it
appear also with OL 2.13?


On 11/16/2014 07:04 PM, gioza wrote:

> You are right, but in my tests I had bad experience with OL 2.13.1.
> I realised poor performance of Zoom function/rendering with vector features
> on google base layer.
> I think this is a OL 2.13.1 issue
> (http://osgeo-org.1560.x6.nabble.com/HELP-OL-2-13-Google-v3-and-other-layers-not-zooming-quot-together-quot-td5060658.html).
>
> OL 2.12 work well with tilecache (tilecache.org), 2.11 not. With OL 2.12 and
> 2.13 in pmapper5 the +/- and nav buttons of olcontrol (the one on the left
> side) don't work.
>
> With OL 2.12 in pmapper5 I verified that if the default layer is in tiles
> mode, in IE11 some tiles are missed and become visible only zooming.
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Tilcache-in-pmapper5-tp4025488p4025673.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> _______________________________________________
> pmapper-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
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] Tilcache in pmapper5?

Raffaele Morelli
In reply to this post by Armin Burger-2
On 12/11/14 at 11:32pm, Armin Burger wrote:

> I added a basic support for native OL layer types. See changeset
>    http://svn.pmapper.net/trac/changeset/1359
>
> should work when called the application with "?config=dev" since all of
> that new type is defined in the "dev" configuration.
>
> The custom.js needs to create and reference the native layers inside the
> block
>    $.extend(PM.OL.Theme.olNativeThemes,
>    {
>
>    });
>
> check also the dev XML config file for "vmapLayerWms", layer type needs
> to be specified as "olnative". Currently it uses a WMS, I tested it also
> with an XYZ layer, TMS & WMTS should work as well.
>
> Note however that some cross checks are still missing, so all
> definitions in XML and the custom.js must be consistent and congruent,
> otherwise you will get some Javascript errors.
>
> In addition, all those definitions should be described in the wiki, but
> so far nobody wanted to update and extend it for p.mapper 5...

Armin,
as a long time user of pmapper4 I am recently digging into pmapper5 willing
to jump in the wiki and give it a "kick".
So, feel free to write me off list in order to set up an account with editing
privileges (I don't see any registration form around).

/raffaele

>
> armin



--
« Nunc est bibendum, nunc pede libero pulsanda tellus »

------------------------------------------------------------------------------
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
[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] Tilcache in pmapper5?

gioza
This post was updated on .
According to Armin indications I tested the "custom.js" for multiple OL WMS layers in this way and it works:

$.extend(PM.OL.Theme.olNativeThemes,
{
    create: function() {        
        this.themeList['vmapLayerWms2'] = this.createVmapWmsLayer();
                this.themeList['vmapLayerWms'] = this.createVmapWmsLayer();
    },
   
    createVmapWmsLayer: function() {
        var vmapLayerWms2 = new OpenLayers.Layer.WMS( "Openlayers WMS",
                                      "http://localhost:8080/cgi-bin/tilecache211/tilecache.cgi?",
                                      {
                                         LAYERS : "TEST3"},
                                                                                { sphericalMercator: true,
        projection: "EPSG:900913"}
                                                                               
                                                                               
                                     );
                                                                         var vmapLayerWms = new OpenLayers.Layer.WMS( "Openlayers WMS2",
                                      "http://localhost:8080/cgi-bin/tilecache211/tilecache.cgi?",
                                      {
                                         LAYERS : "TEST2"},
                                                                                { sphericalMercator: true,
        projection: "EPSG:900913"}
                                                                               
                                                                               
                                     );
               
               
               
     return vmapLayerWms;
        return vmapLayerWms2;
    }    
});

As far as wiki page is concerned I wil try to help in developing it, even if my english isn't so good to take part in writing a technical/howto guide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

Raffaele Morelli
On 18/11/14 at 12:08am, gioza wrote:

> According to Armin indications I tested the "custom.js" for multiple OL WMS
> in this way and it works:
>
> $.extend(PM.OL.Theme.olNativeThemes,
> {
>     create: function() {        
>         this.themeList['vmapLayerWms2'] = this.createVmapWmsLayer();
> this.themeList['vmapLayerWms'] = this.createVmapWmsLayer();
>     },
>    
>     createVmapWmsLayer: function() {

[snipped code]

> As far as wiki page is concerned I wil try to help in developing it, even if
> my my english isn't so good to take part in writing a technical/howto guide

I started working on the wiki and I would suggest you to start writing something
because surely your time will come (unless you want to be involved directly).

Not a mother language here but we can get it ;-)

--
« Nunc est bibendum, nunc pede libero pulsanda tellus »

------------------------------------------------------------------------------
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
[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] Tilcache in pmapper5?

gioza
sorry, above I posted the wrong solution (I do a lot of tests...), this is the right one:

$.extend(PM.OL.Theme.olNativeThemes,
{
    create: function() {        
        this.themeList['vmapLayerWms2'] = this.createVmapWmsLayer2();
                this.themeList['vmapLayerWms'] = this.createVmapWmsLayer();
    },
   
    createVmapWmsLayer2: function() {
        var vmapLayerWms2 = new OpenLayers.Layer.WMS( "Openlayers WMS",
                                      "http://localhost:8080/cgi-bin/tilecache211/tilecache.cgi?",
                                      {
                                         LAYERS : "TEST3"},
                                                                                { sphericalMercator: true,
        projection: "EPSG:900913"}
                                                                               
                                                                               
                                     );
                                                                return vmapLayerWms2;
                                                                          },
                                                                         
        createVmapWmsLayer: function() {  
                                                                         var vmapLayerWms = new OpenLayers.Layer.WMS( "Openlayers WMS2",
                                      "http://localhost:8080/cgi-bin/tilecache211/tilecache.cgi?",
                                      {
                                         LAYERS : "google-tiles"},
                                                                                { sphericalMercator: true,
        projection: "EPSG:900913"}
                                                                               
                                                                               
                                     );
               
               
               
     return vmapLayerWms;
       
    }

       
});
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

gioza
Hi Raffaele,

ok! I start writing my "solutions" or "tips" with pmapper5, I will let you khow.
Giovanni
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

gioza
This solution works also for Bing Maps, Google Maps, OSM Cycle e Transportation...
I think it could work with other map types with a correct ol syntax
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] Tilcache in pmapper5?

gioza
Example for OSM Transportation:

$.extend(PM.OL.Theme.olNativeThemes,
{
    create: function() {        
        this.themeList['vmapLayerWms2'] = this.createVmapWmsLayer2();
                    },
   
   createVmapWmsLayer2: function() {
        var vmapLayerWms2 = new OpenLayers.Layer.OSM.TransportMap();
return vmapLayerWms2;
}

});
Loading...