Hi,

I don't know for "dynlayersample" plugin. But you can also use 
"clientdynamiclayers" base plugin. For real working example, try to have 
a look on "drawing" and "measure2" plugins (short doc here: 
http://svn.pmapper.net/trac/wiki/PluginsDynamicData).

Thomas


Le 25/05/2010 18:53, Niccolo Rigacci a écrit :
> I'm writing a p.mapper application where I need to dynamically
> add some layers on user input.
>
> I'm looking at the dynlayersample plugin, but I cannot understand
> how it is supposed to work. I initialize dynlayers with the given
> example text file:
>
> jsonFile = "dynlayer_def.txt";
> $dynLayers = preg_replace(...., file_get_contents($jsonFile));
> $dyn = new DynLayer($map, $dynLayers);
>
>
> But the DynLayer class seems to expect a different json object,
> because it fails in several places:
>
> foreach ($this->json as $dObj) {
>      require_once($dObj->require);
> ... // $dObj->require is empty
>
> foreach ($dObj->layerlist as $dl) {
>      $this->createDynLayer($dl);
> ... // $dObj->layerlist is not valid for foreach.
>
>
> Is dynlayer an usable feature? Some hints?
>
>    

------------------------------------------------------------------------------

_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to