Re: [mapguide-users] Creating Packages dynamically
0) Seriously, scroll down to the initial response in the mail for a link to the code. 1) You recently posted about the LayerDefinitionFactory, so surely you know how to load xml. Regards, Kenneth Skovhede, GEOGRAF A/S padmini godavarthi skrev: Hi Kenneth, Thanks for u r reply. u told for seeing available code. but where is that code i didn't get it. 1)how to load xml manually can u give me an idea so that it will be helpful to me. Thanks and Regards, Padmini Kenneth Skovhede, GEOGRAF A/S wrote: Restoring a package is quite a big and cumbersome task. If you want to load a layer with oracle data, it is much easier to do so, simply by loading the Xml manually. This can also be done without Administrator credentials. I can offer you no more advice than to look at the avalible code. AFAIK, there is no example code avalible that does exactly what you want, but the code I pointed you to should make it easier to do so. Regards, Kenneth Skovhede, GEOGRAF A/S padmini godavarthi skrev: Hi Kenneth, Thanks for u r reply. u said that "Creating packages is an administrative task, so I won't expect many API users to have a need for it".but i want to load layers from oracle dynamically (i mean to say if i have a,b,c tables in oracle.i ant to load a,b or b,c or a,c layers based on requirement programmetically.so i thought dynamic maestro will support this requirement.) can u plz tell me 1) How can i achieve this requirement dynamically. Thanks and Regards, Padmini. Rodolfo Moreno wrote: thanks Kenneth, It's cool. Kenneth Skovhede, GEOGRAF A/S wrote: Yes, you need at least 1.0.9, but the released version has a bug, with creating packages, so you should get the preview release from the download page: http://trac.osgeo.org/mapguide/wiki/maestro/Downloads The package options are found in the "Package" menu. Regards, Kenneth Skovhede, GEOGRAF A/S Rodolfo Moreno skrev: Hi, I didn't know that Mapguide Maestro can create mapguide packages. I have 1.0.8.27399 version and I have not found this option. could you tell me how can I achieve this? or maybe I need the last maestro version. Thanks, Kenneth Skovhede, GEOGRAF A/S wrote: Hello Padmini. There are no ready-to-use code in MaestroAPI for authoring (creating) MapGuide Packages. Creating packages is an administrative task, so I won't expect many API users to have a need for it. The Maestro application has code that creates and edits packages. The code can be found here: http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/Maestro/PackageManager Especially the file "PackageBuilder.cs" should be of interrest. Regards, Kenneth Skovhede, GEOGRAF A/S padmini godavarthi skrev: Hi, iam using mapguide opensource 2.0 (with .net 2.0+IIS 5.1) Presently iam using mapguide maestro for creating mapguide packages.but i want to create my package dynamically through coding(using maestroAPI.dll) can any boby plz help me 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 - Rodolfo Moreno CivilEng ___ 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 mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Draw Point From Invoke Script n c# script
i have 2 situations 1) I invoke script " ZoomToView(101.657487, 3.161049, 26432.77, true); " then how i just draw a point? anyone can help me?? 2) My file : http://n2.nabble.com/file/n2190486/getlatlong.aspx getlatlong.aspx and http://n2.nabble.com/file/n2190486/gotopoint.aspx gotopoint.aspx , i have 3 text field : X,Y and scale.. i can get the centre of map when i clicked get a result.. how i wanna draw a point that point i insert on 3 textfield.. Thanx - ::: PublicVisitor ::: www.myguidepages.com -- View this message in context: http://n2.nabble.com/Draw-Point-From-Invoke-Script-n-c--script-tp2190486p2190486.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] Creating Packages dynamically
Hi Kenneth, Thanks for u r reply. u told for seeing available code. but where is that code i didn't get it. 1)how to load xml manually can u give me an idea so that it will be helpful to me. Thanks and Regards, Padmini Kenneth Skovhede, GEOGRAF A/S wrote: > > Restoring a package is quite a big and cumbersome task. > If you want to load a layer with oracle data, it is much easier to do so, > simply by loading the Xml manually. This can also be done without > Administrator credentials. > > I can offer you no more advice than to look at the avalible code. > AFAIK, there is no example code avalible that does exactly what you > want, but the code I pointed you to should make it easier to do so. > > Regards, Kenneth Skovhede, GEOGRAF A/S > > > > padmini godavarthi skrev: >> Hi Kenneth, >> Thanks for u r reply. >> >> u said that "Creating packages is an administrative task, so I won't >> expect >> many API >> users to have a need for it".but i want to load layers from oracle >> dynamically >> >> (i mean to say if i have a,b,c tables in oracle.i ant to load a,b or b,c >> or >> a,c layers based on requirement programmetically.so i thought dynamic >> maestro will support this requirement.) >> >> can u plz tell me >> >> 1) How can i achieve this requirement dynamically. >> >> >> >> Thanks and Regards, >> Padmini. >> >> >> >> Rodolfo Moreno wrote: >> >>> thanks Kenneth, It's cool. >>> >>> >>> Kenneth Skovhede, GEOGRAF A/S wrote: >>> Yes, you need at least 1.0.9, but the released version has a bug, with creating packages, so you should get the preview release from the download page: http://trac.osgeo.org/mapguide/wiki/maestro/Downloads The package options are found in the "Package" menu. Regards, Kenneth Skovhede, GEOGRAF A/S Rodolfo Moreno skrev: > Hi, I didn't know that Mapguide Maestro can create mapguide packages. > I have 1.0.8.27399 version and I have not found this option. > could you tell me how can I achieve this? > or maybe I need the last maestro version. > > Thanks, > > > Kenneth Skovhede, GEOGRAF A/S wrote: > > >> Hello Padmini. >> >> There are no ready-to-use code in MaestroAPI for authoring (creating) >> MapGuide Packages. >> Creating packages is an administrative task, so I won't expect many >> API >> users to have a need for it. >> >> The Maestro application has code that creates and edits packages. >> The code can be found here: >> http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/Maestro/PackageManager >> >> Especially the file "PackageBuilder.cs" should be of interrest. >> >> Regards, Kenneth Skovhede, GEOGRAF A/S >> >> >> >> padmini godavarthi skrev: >> >> >>> Hi, >>> iam using mapguide opensource 2.0 (with .net 2.0+IIS 5.1) >>> Presently iam using mapguide maestro for creating mapguide >>> packages.but >>> i >>> want to create my package dynamically through coding(using >>> maestroAPI.dll) >>> >>> can any boby plz help me 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 >> >> >> >> > - > Rodolfo Moreno > CivilEng > > > ___ 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 > > -- View this message in context: http://n2.nabble.com/Creating-Packages-dynamically-tp2167497p2190356.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] Postgis & OGR provider
I'm having the exact same problem, except im running CentOS 4 (RHEL4 compatible) The exception im getting is a "Connection Failed" with no more details than that. Has anyone resolved this issue? Thank you! Gabriele Monfardini wrote: > > Hi all, > > We're having problems using PostGIS and OGR provider. > > We've built MGOS 2.0.1 and fdo-3.3.0 in Ubuntu 7.10 without errors, > but neither PostGIS provider, neither OGR provider works correctly. > They always throw some exceptions when I try to connect to any > PostgreSQL + PostGIS db. > > Under MGOS 1.2 OGR provider works fine with the same data. > > Does anyone use PostGIS with MGOS 2.0.1 and fdo-3.3.0? With which > provider? Using the binary or compiling all from the source? > > > Thanks, > > Gabriele > ___ > mapguide-users mailing list > mapguide-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapguide-users > > -- View this message in context: http://n2.nabble.com/Postgis---OGR-provider-tp1816487p2189744.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] Two maps in the same layout
The easiest way is to have an outer frameset (or 2 outer iframes) that points to your individual ajax viewers. - Jackie Rodolfo Moreno wrote: > > I want to put two maps in the same layout and moreover each map must be > themed in different way just after of that the application to be loaded > (the theming must be done automatically according to a placed preference > in the first time that the application to be loaded). > > I did a test application usign ajax viewer and I got it, however I have > modified many files of the mapguide extensions (MAINFRAME.ASPX, > FRAMESETTASKBAR.TEMPL, FRAMESETNOTASKBAR.TEMPL, MAPFRAME.ASPX, > AJAXMAPPANE.TEMPL). > I would like to know if it's possible to achieve it without the need of > modifying that files? > Also I'd like to know if it's possible to do it in FUSION viewer (I prefer > FUSION than AJAXVIEWER). > > I am attaching a image of my test application. > > thanks in advance, > > http://n2.nabble.com/file/n2189508/testApp.jpg > -- View this message in context: http://n2.nabble.com/Two-maps-in-the-same-layout-tp2189508p2189542.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
[mapguide-users] Two maps in the same layout
I want to put two maps in the same layout and moreover each map must be themed in different way just after of that the application to be loaded (the theming must be done automatically according to a placed preference in the first time that the application to be loaded). I did a test application usign ajax viewer and I got it, however I have modified many files of the mapguide extensions (MAINFRAME.ASPX, FRAMESETTASKBAR.TEMPL, FRAMESETNOTASKBAR.TEMPL, MAPFRAME.ASPX, AJAXMAPPANE.TEMPL). I would like to know if it's possible to achieve it without the need of modifying that files? Also I'd like to know if it's possible to do it in FUSION viewer (I prefer FUSION than AJAXVIEWER). I am attaching a image of my test application. thanks in advance, http://n2.nabble.com/file/n2189508/testApp.jpg - Rodolfo Moreno CivilEng -- View this message in context: http://n2.nabble.com/Two-maps-in-the-same-layout-tp2189508p2189508.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] Adding a temporary Layer in MapGuide
Thank you for your help! I'm seeing that the code you posted is very similar to the buffer code, however I'm really new to MapGuide, so I hope you can help me understanding how to make it work. I created a Layout, using MapGuide Studio, on which I added a new custom command for the Task panel, named "Route tracing". Therefore I created the route_tracing.jsp file, on which I'm trying to use your code (translating it from PHP to JSP) or the buffer.jsp code (which is already in JSP). On both your code and buffer.jsp there is this code: mapName = GetParameter(request, "MAPNAME"); sessionId = GetParameter(request, "SESSION"); - The question is: how can I pass the MAPNAME and SESSION values to the web page? The final result should be a web page, which opens when its Action Task item is clicked, on which I can select and digit some options. After clicking a button the page should get these values, and display the map with the calculated additional layer on it. I hope you can help me about that Cheers Carmelo - Original Message - From: "Arnaud De Groof" To: "MapGuide Users Mail List" Sent: Monday, January 12, 2009 4:18 PM Subject: RE: [mapguide-users] Adding a temporary Layer in MapGuide The first code : Open($userInfo); $resourceService = $siteConnection->CreateService(MgServiceType::ResourceService); // Read the MapDefinition into an XML DOM document object. $md = " Library://XXX/$mapName.MapDefinition "; // TODO Constant! $mdResourceId = new MgResourceIdentifier($md); $mdReader = $resourceService->GetResourceContent($mdResourceId); $mdXml = $mdReader->ToString(); $mdDomDoc = DOMDocument::loadXML($mdXml); // Add a new MapLayer $targetNode = $mdDomDoc->getElementsByTagName("MapLayer")->item(0); $newNode = $targetNode->parentNode->insertBefore(new DOMElement("MapLayer"), $targetNode); $newNode->appendChild($mdDomDoc->createElement("Name", $layerName1)); $newNode->appendChild($mdDomDoc->createElement("ResourceId", $rlLayerResourceId)); $newNode->appendChild($mdDomDoc->createElement("Selectable", "false")); $newNode->appendChild($mdDomDoc->createElement("ShowInLegend", "false")); $newNode->appendChild($mdDomDoc->createElement("LegendLabel")); $newNode->appendChild($mdDomDoc->createElement("ExpandInLegend", "false")); $newNode->appendChild($mdDomDoc->createElement("Visible", "true")); $newNode->appendChild($mdDomDoc->createElement("Group")); // Save the updated MapDefinition $updatedXml = $mdDomDoc->saveXML(); $byteSource = new MgByteSource($updatedXml, strlen($updatedXml)); // Create the temporary MapDefinition $sessionMapName = $mdResourceId->GetName(); $sessionMapDefinition = "Session:$sessionId//$sessionMapName.MapDefinition"; $sessionResourceId = new MgResourceIdentifier($sessionMapDefinition); // Write the updated MapDefinition $resourceService->SetResource($sessionResourceId, $byteSource->GetReader(), null); //Test the updated MapDefinition $md1 = "Session:$sessionId//X.MapDefinition"; $mdResourceId2 = new MgResourceIdentifier($md1); $mdReader2 = $resourceService->GetResourceContent($mdResourceId2); $mdXml2 = $mdReader2->ToString(); $mdDomDoc2 = DOMDocument::loadXML($mdXml2); // Read the WebLayout into an XML DOM document object. $wl = "Library://XXX/XXX.WebLayout"; // TODO Constant! $wlResourceId = new MgResourceIdentifier($wl); $wlReader = $resourceService->GetResourceContent($wlResourceId); $wlXml = $wlReader->ToString(); $wlDomDoc = DOMDocument::loadXML($wlXml); // Now, update the MapDefinition. $mapdef = $wlDomDoc->getElementsByTagName("ResourceId")->item(0); $mapdef->nodeValue = "$md1"; // Prepare the updated XML to be written out to the session. $wlupdatedXml = $wlDomDoc->saveXML(); $wlbyteSource = new MgByteSource($wlupdatedXml, strlen($wlupdatedXml)); // Create a temporary WebLayout $wlsessionMapName = $wlResourceId->GetName(); $wlsessionWebLayout = "Session:$sessionId//$wlsessionMapName.WebLayout"; $wlsessionResourceId = new MgResourceIdentifier($wlsessionWebLayout); // Write the updated WebLayout to the session. $resourceService->SetResource($wlsessionResourceId, $wlbyteSource->GetReader(), null); // Redirect to the Ajax viewer. $redirectTo = "mapguide/mapviewerajax/?SESSION=$sessionId&WEBLAYOUT=$wlsessionWebLayou t"; $host = $_SERVER["HTTP_HOST"]; $url = "http://$host/$redirectTo";; //Test $f = 'test.txt'; $handle = fopen($f,"w"); fwrite($handle, "test1:<".$mdXml.">\r\ntest 2 :<".$updatedXml.">\r\ntest 3 :<".$wlXml.">\r\ntest 4 :<".$wlupdatedXml.">\r\ntest 5 :<".$url.">"); fclose($handle); // Redirect! header("Location: $url"); exit; ?> ___ E-MAIL DISCLAIMER The present message may contain confidential and/or legally privileged information. If you are not the intended addressee and in case of a transmission error, please notify the sender immediately and destroy this E-mail. Disclosur
[mapguide-users] Routing - GPS Coordinates
Hello All, I am developing an application to track routes taken by trucks...I will be receiving the GPS coordinates for these routes, but I want to create line segments or highlight the road segment of the locations that have been passed...Has anyone done anything like this before? Any suggestions? Thanks, Brian ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Add new layer to map
Dear all, I need to add a layer to my map from XML definition. This is my code: Public Sub CreateLater(ByVal sessionID As String, ByVal mapName As String, _ ByVal newLayerName As String, ByVal groupName As String) Dim userInfo As New MgUserInformation userInfo.SetMgSessionId(sessionID) Dim siteConn As New MgSiteConnection siteConn.Open(userInfo) Dim resourceSrvc As MgResourceService = siteConn.CreateService(MgServiceType.ResourceService) Dim map As New MgMap() map.Open(resourceSrvc, mapName) 'Loading XML layer Dim newLayerXML As New XmlDocument newLayerXML.Load(Me.MapPath("NewLayer.xml")) 'Saving new layer in session repository Dim byteSource As New MgByteSource(Encoding.UTF8.GetBytes(newLayerXML.OuterXml), newLayerXML.OuterXml.Length) byteSource.SetMimeType(MgMimeType.Xml) Dim resID As New MgResourceIdentifier("Session:" & sessionID & "//" & newLayerName & "." & MgResourceType.LayerDefinition) resourceSrvc.SetResource(resID, byteSource.GetReader(), Nothing) Dim newLayer As New MgLayerBase(resID, resourceSrvc) 'Add new layer to group Dim layerGroup As MgLayerGroup = Nothing If map.GetLayerGroups().Contains(groupName) Then layerGroup = map.GetLayerGroups.GetItem(groupName) Else layerGroup = New MgLayerGroup(groupName) layerGroup.SetVisible(True) layerGroup.SetDisplayInLegend(True) layerGroup.SetLegendLabel(groupName) map.GetLayerGroups.Add(layerGroup) End If newLayer.SetGroup(layerGroup) 'Insert new layer to map newLayer.SetName(newLayerName) newLayer.SetVisible(True) newLayer.SetLegendLabel(newLayerName) newLayer.SetDisplayInLegend(True) map.GetLayers.Insert(0, newLayer) map.Save(resourceSrvc) Saving the map, an MgNotImplementedException occurs. Where is my mistake? Thanks in advance for your help. Fabio -- View this message in context: http://n2.nabble.com/Add-new-layer-to-map-tp2186494p2186494.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] Image Tool Tips
Finally.. solve d problem.. concat('http://localhost/mapguide/dotnetviewersample/LocationImage/', concat(Name,concat('.jpg','">'))) - ::: PublicVisitor ::: www.myguidepages.com -- View this message in context: http://n2.nabble.com/Image-Tool-Tips-tp2166522p2185765.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] Creating Packages dynamically
Restoring a package is quite a big and cumbersome task. If you want to load a layer with oracle data, it is much easier to do so, simply by loading the Xml manually. This can also be done without Administrator credentials. I can offer you no more advice than to look at the avalible code. AFAIK, there is no example code avalible that does exactly what you want, but the code I pointed you to should make it easier to do so. Regards, Kenneth Skovhede, GEOGRAF A/S padmini godavarthi skrev: Hi Kenneth, Thanks for u r reply. u said that "Creating packages is an administrative task, so I won't expect many API users to have a need for it".but i want to load layers from oracle dynamically (i mean to say if i have a,b,c tables in oracle.i ant to load a,b or b,c or a,c layers based on requirement programmetically.so i thought dynamic maestro will support this requirement.) can u plz tell me 1) How can i achieve this requirement dynamically. Thanks and Regards, Padmini. Rodolfo Moreno wrote: thanks Kenneth, It's cool. Kenneth Skovhede, GEOGRAF A/S wrote: Yes, you need at least 1.0.9, but the released version has a bug, with creating packages, so you should get the preview release from the download page: http://trac.osgeo.org/mapguide/wiki/maestro/Downloads The package options are found in the "Package" menu. Regards, Kenneth Skovhede, GEOGRAF A/S Rodolfo Moreno skrev: Hi, I didn't know that Mapguide Maestro can create mapguide packages. I have 1.0.8.27399 version and I have not found this option. could you tell me how can I achieve this? or maybe I need the last maestro version. Thanks, Kenneth Skovhede, GEOGRAF A/S wrote: Hello Padmini. There are no ready-to-use code in MaestroAPI for authoring (creating) MapGuide Packages. Creating packages is an administrative task, so I won't expect many API users to have a need for it. The Maestro application has code that creates and edits packages. The code can be found here: http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/Maestro/PackageManager Especially the file "PackageBuilder.cs" should be of interrest. Regards, Kenneth Skovhede, GEOGRAF A/S padmini godavarthi skrev: Hi, iam using mapguide opensource 2.0 (with .net 2.0+IIS 5.1) Presently iam using mapguide maestro for creating mapguide packages.but i want to create my package dynamically through coding(using maestroAPI.dll) can any boby plz help me 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 - Rodolfo Moreno CivilEng ___ 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