Re: [mapguide-users] Edit Layer
Hi, Thanks In ur code Dim sessionID As String = Request.Params(SESSIONID) Dim mapdefinition As String = Request.Params(MAPDEFINITION) Dim layername As String = Request.Params(LAYERNAME) Dim newFilter As String = Request.Params(NEWFILTER) 1) from where it will come.i mean Request.Params(SESSIONID) , Request.Params(MAPDEFINITION) ,Request.Params(LAYERNAME) , Request.Params(NEWFILTER) all these things Regards, Padmini Kenneth Skovhede, GEOGRAF A/S wrote: You need to call the aspx page with the session id, either as a querystring or as a post. 'Read setup from querystring or form Dim sessionID As String = Request.Params(SESSIONID) Dim mapdefinition As String = Request.Params(MAPDEFINITION) Dim layername As String = Request.Params(LAYERNAME) Dim newFilter As String = Request.Params(NEWFILTER) 'Replace myserver with the server name, or use localhost Dim host As New Uri(http://myserver/mapguide/mapagent/mapagent.fcgi;) Dim conn as ServerConnectionI = New HttpServerConnection(host, sessionID, en, true) 'Use the same naming system as the viewer, when reading the runtime map ID Dim mapName as String = new ResourceIdentifier(mapdefinition).Name Dim rtMapId as String = new ResourceIdentifier(mapName, ResourceTypes.RuntimeMap, conn.SessionID) 'Load the runtime map Dim rtMap as RuntimeClasses.RuntimeMap = conn.GetRuntimeMap(rtMapId) Dim rtLayer as RuntimeClasses.RuntimeMapLayer = rtMap.Layers(layername) 'Get the current layer and assing the filter Dim layerDefinition as LayerDefinition = conn.GetLayerDefinition(rtLayer.ResourceId) Dim vectorLayerDefinition as VectorLayerDefinitionType = layerDefinition.Item vectorLayerDefinition.Filter = newFilter 'Save a copy of the layer, temporary, and random name rtLayer.ResourceID = new ResourceIdentifier(Guid.NewGuid().ToString(), ResourceTypes.LayerDefinition, conn.SessionID) conn.SaveResourceAs(layerDefinition, rtLayer) 'Save the runtime map, pointing to the updated layerdefinition conn.SaveRuntimeMap(rtMapId, rtMap) 'Tell the client to refresh RegisterStartupScript(key, scriptGetMapFrame().Refresh();/script) Regards, Kenneth Skovhede, GEOGRAF A/S padmini godavarthi skrev: Hi iam using Mapguide opensource 2.0(with .net 2.0 +IIS 5.1) Hi, We want modify dynamically a layer; for exemple, modify the filter of a layer when the map is loaded;Is it possible ? What is the method : using an API ? can u give me the sample code in .net so that it will be very helpful to me Regards, Padmini. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/Edit-Layer-tp20898181p20899278.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] gettile method problems
Hello Kenneth, If after call GetTile I write the tile in a temporary directory, then the service does not goes down. Strange behaviour... Now my code looks something like this: for (int s = scaleCount -1; s =0; s--) { // nTilesX and nTilesY calculation // ... for (int r = 0; r = nTilesX; r++) { for (int c = 0; c = nTilesY; c++) { MgByteReader br = ts.GetTile(mapResId, layerGroup, c, r, s); MgByteSink bs = new MgByteSink(br); bs.ToFile(@c:\Temp\s+ s.ToString() +_r+r.ToString()+_c+ c.ToString()+.jpg); } } } If I comment the lines for write the tiles, then I get the exception again. Any Idea? Kenneth Skovhede, GEOGRAF A/S wrote: I can't tell you exactly what goes wrong, but work for a tile generator has been done elsewhere. The FMTilingEngine prepares tiles, and automatically restarts the MapGuide service when it encounters the problem: http://www.websoftdev.com/download.cfm Zac has developed a browser based tile seeder: http://zacster.blogspot.com/2008/07/mapguide-tile-cache-seeder.html I am building a tile seeder for use with Maestro (not complete, and not released, LGPL): http://svn.osgeo.org/mapguide/trunk/Tools/Maestro/MgCooker/ Perhaps the FMTilingEngine will solve your troubles. If not, you can consider building on one of the other solutions. Regards, Kenneth Skovhede, GEOGRAF A/S alucas skrev: Hello all, I'm trying to develop a tile pre-generation desktop application. To do this, I'm using mapguidedotnetapi.dll reference. My program creates a connection to the server and through the tileservice try to call gettile method for every tile. My problem is that gettile method fails and returns an xmlstream exception, then I need to restart the server service because I get a connection exception. This is the exception: http://www.nabble.com/file/p20872280/exception.jpg The exception happens not in the first gettile call, it happens when I called several times this method. My program is something like this: ... for each scalecount for each column for each row tileService.GetTile(mapResId, layerGroupName, c, r, s) ... Solutions I tried: - Modify serverconfig.ini to enable poolconnections for my data. - Use thread.sleep between iterations - Use a separate thread to do this work - Generate tiles only for a scale factor. This solutions does not work for me. Any idea? Sorry for my english... Thanks in advance ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users -- View this message in context: http://www.nabble.com/gettile-method-problems-tp20872280p20899422.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] WMS Syntax
The official specs are too lengthy to quote, but can be found here: http://www.opengeospatial.org/standards/wms The base url is the mapagent: http://server/mapguide/mapagent/mapagent.fcgi?SERVICE=WMSREQUEST=GETCAPABILITIES Regards, Kenneth Skovhede, GEOGRAF A/S Andre Schoonbee skrev: Hi All I published my boundary layer in MGOS as WMS layer. Now, what syntax should I use to call this layer from a web app PLEASE Andre __ Information from ESET Smart Security, version of virus signature database 3674 (20081209) __ The message was checked by ESET Smart Security. http://www.eset.com ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] How to add Control to The ajaxviewer
Hi, iam using Mapguide opensource 2.0(with .net 2.0 +IIS 5.1) 1) Now my problem is that i want a drop down list on the ajaxvewer control (side to the pan image button). actually my requirement is that i want to display the query features on the map. My thought is that when i selecting the query from dropdown list a frame will be displayed on the right side( for selecting layername and query conditions) .After selecting all these thisngs based on that query map will be zoomed based on the condition. But i dontknow the code how to and where to start it? can u give the hint so that i can place a dropdown list on this control and where to start for displaying the right side fram(contains drop down lists and buttons) Thanks, Padmini -- View this message in context: http://www.nabble.com/How-to-add-Control-to-The-ajaxviewer-tp20910259p20910259.html Sent from the MapGuide Users mailing list archive at Nabble.com. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users