[mapguide-internals] Getting Layer and Group ids from Viewer Server Side Components.

Carl Jokl carl.jokl at keynetix.com
Tue Sep 8 11:32:51 EDT 2009




zspitzer wrote:
> 
> in php based off some of the samples
> 
> $layerCollection = $map->GetLayers();
> PrintLayerCollection($layerCollection);
> $map->Save($resourceService, $mapStateId);
> 
> function PrintLayerCollection($layerCollection)
> {
>         for ($i = 0; $i < $layerCollection->GetCount(); $i++)
>         {
>             $layer = $layerCollection->GetItem($i);
>             PrintLayer($layer);
>         }
> }
> 
> Thank You. That is helpful. I am curious about how the AJAX viewer is
> getting hold of the object ids but I can have a look and try to find out.
> 
> function PrintLayer($layer)
> {
>     echo $layer->GetName() . ':'.$layer->GetObjectId() . ";\n";
> }
> 
> z
> 
> 
> 
> On Mon, Sep 7, 2009 at 10:34 PM, Carl Jokl<carl.jokl at keynetix.com> wrote:
>>
>> I am currently working on some .Net based stress testing tools. I have
>> used
>> and example MapGuide testing Grinder application. I adapted a lot of this
>> to
>> work with our existing .Net based MapGuide framework. One thing I still
>> need
>> to do though if have a way to get hold of layer ids (and group ids) for
>> use
>> in the code for turning layers and groups on and off. It seems that these
>> ids seem to be generated when the application is running. Logically if
>> the
>> AJAX viewer has access to them it must have been able to get hold of them
>> from one of the server data pages or data portals. The question is how to
>> invoke the server in a similar fashion to which Ajax viewer does to get
>> hold
>> of the layer and layer group ids for the currently loaded map in the
>> current
>> session.
>>
>> Has anyone done this. I am going to look at the client side JavaScript
>> code
>> to try and find clues but if anyone has already done this they might be
>> able
>> to give me some pointers.
>> --
>> View this message in context:
>> http://n2.nabble.com/Getting-Layer-and-Group-ids-from-Viewer-Server-Side-Components-tp3597110p3597110.html
>> Sent from the MapGuide Internals mailing list archive at Nabble.com.
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
> 
> 
> 
> -- 
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> 
> 

-- 
View this message in context: http://n2.nabble.com/Getting-Layer-and-Group-ids-from-Viewer-Server-Side-Components-tp3597110p3604077.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.


More information about the mapguide-internals mailing list