[mapguide-internals] Toggling layers on and off in a load tester application.

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Fri Sep 25 13:27:08 EDT 2009


AFAIK, it is not possible to toggle layers on/off from
a client request, even if the GUID items are present.

I have never gotten it to work, and can't see it being done
in the viewer either.

You need a server side script to toggle the layer visibility
in the runtime map.

I wrote RFC 21 way back, which would support something like this:
http://trac.osgeo.org/mapguide/wiki/MapGuideRfc21

I would LOVE to have every API function supported
in the http interface, so more functions can be performed
without having server side access.

The RFC should probably be scrapped, and a new one written
that states that all API methods should have a http equivalent.

I'm guessing that the REST API that Jason & Harris put up,
can support something like this, but it's still a server item
that needs to be installed.

Regards, Kenneth Skovhede, GEOGRAF A/S



Carl Jokl skrev:
> I am fairly far along in in development of a .Net MapGuide Enterprise load
> tester. I have recently had some problems when trying to toggle layers on
> and off on the test map. I thought that this was working but it looks like
> it may not have been after all. 
>
> I used the grider script as a starting point and ported the functionality to
> .Net using our own MapGuide framework's HttpRequest making component. 
>
> The problem which I am having is that when I am calling the code to turn off
> a layer and getting the image back the image does not show that layer having
> been turned off. I even used FireFox live headers to observer every request
> which the AJAX viewer makes to the server and my code is making requests in
> identical format and yet for me it isn't working. I have functionality to
> translate layer names to ids as I know layer object ids need to be
> submitted. I have tried both the route of creating an overlay image as well
> as just creating a regular map image. Neither approach is showing the layer
> I am trying to hide being hidden. I can't see what is different about the
> requests that I am making from those made by the Ajax Viewer. I feel like I
> have tried just about everything at this point. Matching even the parameter
> order (not that this should matter in Http but you never know when dealing
> with Autodesk Software). We are using MapGuide Enterprise 2010 Service Pack
> 1. There is the BEHAVIOR parameter. I am using the same one as the AJAX
> viewer but I don't know what behaviour is associated with each number. I am
> not sure if this is even documented as I might guess a lot of this stress
> testing work is based on a fair amount of reverse engineering.
>
> I did notice for a lot of the requests to create a dynamic map image overlay
> by the AJAX view the CLIENTAGENT parameter appears twice in the url query. I
> am pretty sure that this is a viewer bug.
>   


More information about the mapguide-internals mailing list