[mapguide-users] Modify layout and layer on map

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Mon Mar 9 16:11:08 EDT 2009


Take a look at this page, it shows how to modify the map before it loads:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/AddInitialLayer

I think it's pretty close to what you want.
It is using the MaestroAPI, which is a bit different from the official 
API, but the general idea is the same.

On this page you can see how to modify the layer filter, after the map 
has loaded:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/ModifyLayerFilter

General documentation for the MaestroAPI is here:
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI

Regards, Kenneth Skovhede, GEOGRAF A/S



euskalmap skrev:
> Hi, sorry for my late reply !! So, i do not understand where can i 
> writing my code (remember that my code change layout definition and 
> filters in map layers). mapgudie load map in 
> /mapguide/mapvierwernet/ajaxviewer.aspx, 
> /mapguide/mapvierwernet/mainframe.aspx and 
> /mapguide/mapvierwernet/mapframe.aspx. If I execute the code before 
> /mapguide/mapvierwernet/ajaxviewer.aspx (like 
> ajaxtiledviewersample.aspx in dotnetviewersample), nothing append : 
> the original map and filter with no modify are loading! If I execute 
> after, I do not where ?? you say '/simply provide the end user with a 
> link to your special page.In that page, do the setup, and then 
> redirect to the MapGuide viewer files (Response.Redirect). '/ in my 
> special page i call /mapguide/mapvierwernet/ajaxviewer.aspx but who do 
> I execute the instruction Response.Redirect ? Tanks Francis 
> ____________________________________________________
>
>     Kenneth Skovhede, GEOGRAF A/S wrote:
>     If you are modifying the layout, you probably want to run your
>     code before starting the application. To do so, simply provide the
>     end user with a link to your special page. In that page, do the
>     setup, and then redirect to the MapGuide viewer files
>     (Response.Redirect). If you want to modify the map, while running
>     the viewer, you can either setup a handler for the maps "OnLoad",
>     which trigger your special page, or you can put in pages through
>     "Custom Actions" on the layout. Regards, Kenneth Skovhede, GEOGRAF
>     A/S euskalmap skrev: > hi, > I developed a program which modify
>     layout and layer on the map. > I do not who can i call this
>     program (it is an aspx file with C# code) : > > in a file in the
>     directory mapguide/mapviewernet and with a #include or > after the
>     last instruction who lad the map in a mapguide file ? > I don't no
>     who ? > > I will not modify mapguide file to avoid the errors at
>     the time of new the > version mapguide. > > Have you an idea ? >
>     _______________________________________________ mapguide-users
>     mailing list mapguide-users at lists.osgeo.org
>     http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: Modify layout and layer on map 
> <http://n2.nabble.com/Modify-layout-and-layer-on-map-tp2268226p2450009.html>
> Sent from the MapGuide Users mailing list archive 
> <http://n2.nabble.com/MapGuide-Users-f1803227.html> at Nabble.com.
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090309/44a7b292/attachment.html


More information about the mapguide-users mailing list