I like your
idea but I have few concerns:
I am not
professional and I am not sure about the result of the work.
In this
case I have used wmsplugin and clientdynamiclayers and I don’t know if I can
make one plugin which is actual remix of the above plugins.
However I
will do one effort and I will send you the data to evaluate.


________________________________
Απο: Thomas RAFFIN <traf...@sirap.fr>
Προς: Andreas Douvalis <anddre...@yahoo.gr>
Στάλθηκε: 8:50 π.μ. Τρίτη, 24 Μαΐου 2011
Θεμα: Re: Add raster layer with clientdynamiclayers


 Hi,

Why not make a plugin (with few js code) that will call that, and
    put it pmapper code public? 

Le 23/05/2011 22:51, Andreas Douvalis a écrit : 

>
>I did it.
>
>
>Thank you for your help.
>
>
>My json def:
>var myLayer = '[{"def": {"type": "json", "layername": "wms_layer", "category": 
>"user_layers", "jsondef": {"name": "wms_layer", "group": "user_layers", 
>"type":3, "projection":"init=epsg:4326", "METADATA": 
>{"wms_group_title":"user_layers", "wms_title":"wms_layer", 
>"wms_name":"wms_layer", "wms_server_version":"1.1.1", "wms_srs": "EPSG:4326", 
>"wms_format": "image/png"}}}, "datatype": "DynWMS", "data": 
>"http://gis.ktimanet.gr/wms/wmsopen/wmsserver.aspx"}]';
>
>
>PM.Map.ClientDynamicLayers.addOrReplaceLayers(myLayer); (for adding wms layer)
>
>
>class clientDynamicLayer_DynWMS extends clientDynamicLayer
>{
>
>protected function addFeatures($geoData) {
>        $this->oneOrMoreFeatures = false;
>        
>        if ($this->layer != null) {    
>                $ret1 = $this->layer->set("connection",
          $geoData);
>                $ret2 =
          $this->layer->setConnectionType(MS_WMS);   
>
>        }
>        return $this->oneOrMoreFeatures;
>    }
>   
>}
>
>
>
>Moreover I alter dynlayer.php by adding the lines below:
>
>
>Line 165:
>                        case "RASTER":
>                            $v2 = MS_LAYER_RASTER;
>                            break;
>
>
>And Line 213:
>             ......} elseif (preg_match("/projection/", $k)) {                 
>       
>                       
          $obj->setprojection($v);                   
>                    } elseif.....
>
>Thanks again
>
>
>________________________________
>Απο: Thomas RAFFIN <traf...@sirap.fr>
>Προς: pmapper-users@lists.sourceforge.net
>Στάλθηκε: 12:59 μ.μ. Δευτέρα, 23 Μαΐου 2011
>Θεμα: Re: [pmapper-users] Add raster layer with clientdynamiclayers
>
>Hi,
>
>Clientdynamiclayers is only the base for pmapper community
            to develop 
>its own functionalities. It only modifies the map object
            that represents 
>your mapfile by adding layers dynamically.
>
>So you can easily develop:
>- plugins that manage dynamic data (like drawing or
            measure2): 
>http://svn.pmapper.net/trac/wiki/PluginsDynamicData
>- use different data sources. For now only GeoJSON is
            implemented.
>
>I think it could be very simple to add other data types if
            you have PHP 
>skills.
>
>1) The JSON you send should be like that (in js):
>var myLayer = [{"def": {"type": "json", "layername":
            "myWmsLayer", 
>"jsondef": {"name": "myWmsLayer",
>...
>}} , "datatype": "DynWMS", "data":
            "somethingThatDifineYourWMSData"}];
>
>PM.Map.ClientDynamicLayers.addOrReplaceLayers(myLayer);
>
>2) And in PHP write the "clientDynamicLayer_DynWMS" class
            like 
>"clientDynamicLayer_GeoJson".
>
>Thomas
>
>Le 21/05/2011 11:50, Andreas Douvalis a écrit :
>> Sorry for
>> my bad English.
>> My question
>> again:
>> How can I use
>> clientdynamiclayers plugin in relation of adding raster
            layers?
>>
------------------------------------------------------------------------------
>> What Every C/C++ and Fortran developer Should Know!
>> Read this article and learn how Intel has extended the
            reach of its
>> next-generation tools to help Windows* and Linux* C/C++
            and Fortran
>> developers boost performance applications - including
            clusters.
>> http://p.sf.net/sfu/intel-dev2devmay
>> _______________________________________________
>> pmapper-users mailing list
>> pmapper-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>
>>
>>
>
>------------------------------------------------------------------------------
>What Every C/C++ and Fortran developer Should Know!
>Read this article and learn how Intel has extended the reach
            of its 
>next-generation tools to help Windows* and Linux* C/C++ and
            Fortran 
>developers boost performance applications - including
            clusters. 
>http://p.sf.net/sfu/intel-dev2devmay
>_______________________________________________
>pmapper-users mailing list
>pmapper-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/pmapper-users
>
>
>
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to