Re: [mapguide-users] Re: Simple OGR FDO question
Hmm, yes that seems to be the problem. Unfortunately the OGR dll in MGOS 2.1 does not link to the gdal16.dll (not sure about the MGEP2010), so you have to build both the gdal and the fdo-ogr dll. Regards, Kenneth Skovhede, GEOGRAF A/S On 11-03-2010 23:03, Traian Stanev wrote: I'm not 100% sure, but I think GDAL/OGR (not the FDO provider, GDAL itself) needs to be compiled with some specific settings in order to have KML support. You may have to replace the GDAL DLL for FDO with one that has KML support compiled in it. Traian -Original Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Jamo Sent: Thursday, March 11, 2010 4:10 PM To: mapguide-users@lists.osgeo.org Subject: [mapguide-users] Re: Simple OGR FDO question Kenneth. I thought it would be that easy however ... I get the following error when testing the connection in maestro 2010-03-12T07:00:17> 3188MapGuide Maestro v2.0.0.4586 172.16.40.28 Administrator Error: An exception occurred in FDO component. Connect failed: StackTrace: - MgFeatureServiceHandler.ProcessOperation() line 83 file d:\build\testarossa_nightly\build_30.1\ent\os\server\src\services\feature\FeatureServiceHandler.cpp - MgOpTestFeatureSourceConnection.Execute() line 100 file d:\build\testarossa_nightly\build_30.1\ent\os\server\src\services\feature\OpTestFeatureSourceConnection.cpp - MgFdoConnectionManager.Open() line 900 file d:\Build\Testarossa_Nightly\BUILD_30.1\Ent\OS\Server\src\Common\Manager\FdoConnectionManager.cpp The file in question can be found in this google earth network link http://www.marinetraffic.com/ais/ge.aspx which calls this page http://marinetraffic2.aegean.gr/ais/getkml.aspx I have extracted the kml document form the kmz prior to testing in mapguide. any thoughts? Jason. I'm using Mapguide Enterprise 2010 Do I have to recompile the SL.King.KML provider to function with my version of FDO? I haven't tried the provider yet but I'm not sure on how the FDO versions effect seperate providers built for different versions of FDO. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Simple OGR FDO question
If you create a new OGR featuresource, simply set the "DataSource" parameter to point to the KML file. Be sure to set "ReadOnly" to TRUE. If you use Maestro, you can upload the file, or enter the path to the KML file in the UI. Behind the scenes it just sets the DataSource parameter for you. Regards, Kenneth Skovhede, GEOGRAF A/S On 11-03-2010 06:18, Jamo wrote: Can Mapguide use KML as a datastore to grab information from? If so how do i connect to the KML using OGR? I'm trying to load some point data from a kml file and I'm not sure if it is just corrupt data or not.. I've been playing around with the FDO api and if it isn't possible I can always run punch the kml file into a SDF. Would be easier if it could be read directly into Mapguide though. Cheers ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Impossible Get Entry Point 'CSharp_MgSiteConnectionToMgGuardDisposable' in DLL 'MapGuideUnmanagedApi'
Unfortunately no. I have not yet found a way to configure assembly redirects at runtime. Regards, Kenneth Skovhede, GEOGRAF A/S On 08-03-2010 13:29, carls wrote: Thank you very much, Kenneth Skovhede! I saw the linked page and felt that it is a bit complicated. Is it possible to wrap all the relative settings within MaestroAPI? - Regards, Carl SHE ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] OSGeo.PostGIS.3.4 provider connection error
Please search yourself before asking: http://www.google.com/search?q=mapguide+postgis+The+specified+module+could+not+be+found One of the top 3 search results is this, which is likelythe cause: http://n2.nabble.com/Trouble-connecting-Mapguide-to-Postgis-td3690709.html If you did search before asking, please provide additional information, such as any problems reported by the dependency walker. Regards, Kenneth Skovhede, GEOGRAF A/S On 08-03-2010 07:29, siva4gis wrote: Hi, i am using Mapguide 2.1,Mapguide Maestro,Postgresql 8.3. i got below error when i connect PostGIS with OSGeo.PostGIS.3.4 provider The remote server returned an error: (559) MgFdoException.: An exception occurred in FDO component. Unable to load the FDO Provider: The specified module could not be found. and also i tried this with Postgresql 8.4 same error Siva http://n2.nabble.com/file/n4693703/screen1.jpg ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Redline Text
You should use a click tool. If you use the Ajax viewer, the function is called DigitizePoint, not sure what the equivalent is in Fusion, but you can load some MapGuide compatibility script if you can't find the right one. In the callback handler you will get the x/y value of the point that the user has clicked (in mapping coordinate system (MCS) values). You then need to send the value to the server, using AJAX or a form post or similar. On the server, if you have a database, simply insert the record as you would normaly, using an SQL INSERT statement. If you are not using a database (or want to support multiple datasource types), you can use the MapGuide MgUpdateFeatures functions: http://www.osgeo.org/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service_278b25e5af6145f091457701fec788dd.htm#278b25e5af6145f091457701fec788dd And specifically: http://www.osgeo.org/files/mapguide/docs/webapi/d4/d63/class_mg_insert_features.htm Regards, Kenneth Skovhede, GEOGRAF A/S On 04-03-2010 09:14, Twi wrote: I have a datasource with a layer that looks my annotations. The problem how to liaison between the click of the user and insert the annotation database? Thank you ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Redline Text
You need: 1) A data connection (FeatureSource) that you can write to. 2) A column in the datasource that can contain the text 3) A layer that is set up to display the labels from the column Then, for each time the user clicks, simply insert a record in the datasource, and refresh the map. Since you mention redline, I assume that you already have the datasource, you just need a spare column and a layer. Regards, Kenneth Skovhede, GEOGRAF A/S On 03-03-2010 23:01, Twi wrote: I want to create annotations when the user clicks on the map. I started programming. NET on the redlines. Where to start? Have you documented? Thank you ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Maestro Api runtime map selection
The MgFeatureService has a CreateFeatureSource method: http://www.osgeo.org/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service_8401551df70ab47d9c107985b9f5283f.htm#8401551df70ab47d9c107985b9f5283f Unfortunately it is only possible to give it a MgCreateSdfParams object, so you can only create SDF datastores: http://www.osgeo.org/files/mapguide/docs/webapi/d8/dd5/class_mg_create_sdf_params.htm Regards, Kenneth Skovhede, GEOGRAF A/S On 03-03-2010 21:55, Jamo wrote: Cheers Kenneth, I really like the selection api :) will make life a little easier in places for me. Bummer about the creation of datastores but I'm sure I will find a way. Anyone have any FDO examples?, I have not used the FDO api as of yet to produce datstores... First test seems to bomb out with a exception External component has thrown an exception. IProviderRegistry r = FeatureAccessManager.GetProviderRegistry(); IConnectionManager cm = FeatureAccessManager.GetConnectionManager(); providers = r.GetProviders(); I think it's something to do with the DLLs in the Bin dir, I have reduced the providers to SHP and SDF in the xml file this is stored in the bin dir can I store these fdo components in it's own directory, this would only be for organising the site. Are there any specific dlls I require for the SHP / SDF providers to be stored in the same location? ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Argument is out of range
I don't have an explanation for your issue, but perhaps you can overcome this problem by building packages directly from MapGuide Maestro? In case you are already building packages from Maestro, you can try the package manager in the Site Administrator and see if you have better luck with that one. If you have trouble with both, can you narrow down the problem to a specific folder or resource? Regards, Kenneth Skovhede, GEOGRAF A/S On 03-03-2010 12:07, pilchid wrote: Hello there. I am trying to fugure out how I can package up my site so that I can send it to our developers to have a tweak around with and possibly try out on studio 2010 before we commit. However - when I go to make package it times out after a while with the error - Cannot create package from folder Library://: Argument is out of range. Any ideas what I am doing wrong? Thank for your help. Matt ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Maestro Api runtime map selection
Dooh! That was the method that did NOT work :) The workaround method is: selection = new OSGeo.MapGuide.MaestroAPI.Selection(rtMap); selection.FromXml(rtMap.CurrentConnection.GetSelectionXml(rtMap.ResourceID)); Regards, Kenneth Skovhede, GEOGRAF A/S On 03-03-2010 09:05, Kenneth Skovhede, GEOGRAF A/S wrote: Unfortunately the MaestroAPI cannot create datastores, or update/insert features because this is not exposed in the MapGuide http API. You have to use the MapGuideDotNetApi.dll or similar to access those functions. As a workaround, you can instead use an SQLite database, which you can create and upload to a FeatureSource. This enables you to control the database layout, and also allows you to connect to the database with standard tools (such as ODBC or System.Data.IDbConnection), for updates and inserts. There seems to be a bug regarding Selections (selection support was introduced recently). You can get the selection this way until the bug is fixed: selection = new OSGeo.MapGuide.MaestroAPI.Selection(rtMap, rtMap.CurrentConnection.GetSelectionXml(rtMap.ResourceID)); This should also reveal how to get the selection document directly. The ToString() function is not overloaded, so when using the selection object you have to use ToXml() instead. I will fix this too. Regards, Kenneth Skovhede, GEOGRAF A/S On 02-03-2010 21:57, Jamo wrote: Ok I started creating a class of my own that would produce a layer definition and save it to the repository... Got upto the point of creating vector scale ranges and thought . Dang this has already been done. Enter --> Maestro Api. Is this the correct place to be asking about the maestro api? Can maestro Api create an SDF data store ? with actual SDF data file ? Can maestro Api write features to the SDF data store ? It looks like It can do everything else I need. prepare a new layerdefinition and add it to the map. (and save it to the library if the user requires) grab existing layer definition amend it and save it back. I've been requested to improve my markup tools to include more variety, at the moment users can just draw a red line draw a red polygon and place a red ricle . very bland. I'm suggesting maybe to produce a dialog that lets the user choose all the style options themselves. then save it as a vectorscale range and filter it with style = 1, style =2 on the actual elements... I'm just trying some basic maestro commands and the below code returns no selection (blank featureset) Have I got the real instance of the runtime map? Uri host = new Uri(mapagent); ServerConnectionI conn = new HttpServerConnection(host, sessionId, "en", true); ResourceIdentifier res = new ResourceIdentifier("PortBris",ResourceTypes.RuntimeMap,sessionId); RuntimeMap rtMap = conn.GetRuntimeMap(res.ResourceId); Response.Write(rtMap.Selection); ___ 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
Re: [mapguide-users] Maestro Api runtime map selection
Unfortunately the MaestroAPI cannot create datastores, or update/insert features because this is not exposed in the MapGuide http API. You have to use the MapGuideDotNetApi.dll or similar to access those functions. As a workaround, you can instead use an SQLite database, which you can create and upload to a FeatureSource. This enables you to control the database layout, and also allows you to connect to the database with standard tools (such as ODBC or System.Data.IDbConnection), for updates and inserts. There seems to be a bug regarding Selections (selection support was introduced recently). You can get the selection this way until the bug is fixed: selection = new OSGeo.MapGuide.MaestroAPI.Selection(rtMap, rtMap.CurrentConnection.GetSelectionXml(rtMap.ResourceID)); This should also reveal how to get the selection document directly. The ToString() function is not overloaded, so when using the selection object you have to use ToXml() instead. I will fix this too. Regards, Kenneth Skovhede, GEOGRAF A/S On 02-03-2010 21:57, Jamo wrote: Ok I started creating a class of my own that would produce a layer definition and save it to the repository... Got upto the point of creating vector scale ranges and thought . Dang this has already been done. Enter --> Maestro Api. Is this the correct place to be asking about the maestro api? Can maestro Api create an SDF data store ? with actual SDF data file ? Can maestro Api write features to the SDF data store ? It looks like It can do everything else I need. prepare a new layerdefinition and add it to the map. (and save it to the library if the user requires) grab existing layer definition amend it and save it back. I've been requested to improve my markup tools to include more variety, at the moment users can just draw a red line draw a red polygon and place a red ricle . very bland. I'm suggesting maybe to produce a dialog that lets the user choose all the style options themselves. then save it as a vectorscale range and filter it with style = 1, style =2 on the actual elements... I'm just trying some basic maestro commands and the below code returns no selection (blank featureset) Have I got the real instance of the runtime map? Uri host = new Uri(mapagent); ServerConnectionI conn = new HttpServerConnection(host, sessionId, "en", true); ResourceIdentifier res = new ResourceIdentifier("PortBris",ResourceTypes.RuntimeMap,sessionId); RuntimeMap rtMap = conn.GetRuntimeMap(res.ResourceId); Response.Write(rtMap.Selection); ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: How to change Existing Max scale for a layer
I don't think you remove the previous layer from the MgMap? Try setting the legend label to something obvious, and DisplayInLegend = true, so you can see if the layer is actually added to the map. You may have to right click and choose Refresh in the legend for the layer to appear. As for the map.Save(), you need the mapname, like: map.Save(resourceService, "Sheboygan"); Regards, Kenneth Skovhede, GEOGRAF A/S On 01-03-2010 09:46, SriRam007 wrote: Utility.InitializeWebTier(Request); string myLayerName = ddlLayerForScale.SelectedItem.Text.ToString(); MgUserInformation userInfo = new MgUserInformation(Session["ID"].ToString()); MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo); MgResourceService resourceService = siteConnection.CreateService(MgServiceType.ResourceService) as MgResourceService; MgMap map = new MgMap(); map.Open(resourceService, "Sheboygan"); MgLayerCollection layers = map.GetLayers(); ArrayList layerNames = new ArrayList(); MgLayer layer = Utility.GetLayerByName(map, myLayerName); string s = layer.GetLayerDefinition().ToString(); MgResourceIdentifier resId = new MgResourceIdentifier(layer.GetFeatureSourceId()); MgResourceIdentifier layerDefResId = layer.GetLayerDefinition(); MgByteReader byteReader = resourceService.GetResourceContent(layerDefResId); string byteReaderStr = byteReader.ToString(); ArrayList ReplaceValue = new ArrayList(); //ReplaceValue = ViewState["scaleRanges"] as ArrayList; ReplaceValue = GetModifiedscaleValuefromGrid(); bool Validate = ValidateScaleValues(ReplaceValue); if (Validate == true) { string layerDefinition = ReplaceScaleNodeValue(byteReaderStr, ReplaceValue); String uniqueName = this.MakeUniqueLayerName(map, myLayerName); MgResourceIdentifier layerResId = new MgResourceIdentifier("Session:" + Session["ID"].ToString() + "//" + uniqueName + ".LayerDefinition"); MgByteReader reader = new MgByteReader(layerDefinition, "text/xml"); resourceService.SetResource(layerResId, new MgByteReader(layerDefinition, "text/xml"), null); MgLayer newLayer = new MgLayer(layerResId, resourceService); newLayer.SetName(uniqueName); newLayer.SetLegendLabel(layer.GetLegendLabel()); newLayer.SetDisplayInLegend(layer.GetDisplayInLegend()); newLayer.SetVisible(true); newLayer.SetSelectable(layer.GetSelectable()); layers.Insert(layers.IndexOf(layer), newLayer); newLayer.ForceRefresh(); map.Save(resourceService);//Not showing error but not working also. //map.Save(resourceService, layerResId);//showing error ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "RefreshMap", "parent.parent.mapFrame.Refresh();", true); } else { lblerror.Text = "Please enter correct scale ranges."; } where i need to change please guide me. thanks ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Re: Unable to hide layers
IIRC there is a difference in how GETMAPIMAGE and GETDYNAMICOVERLAYIMAGE handles the HIDELAYERS / SHOWLAYERS paramter. Have you verified that the request sent to MapGuide is correct? What happens if you use the opposite OPERATION parameter? Previous to MGOS 2.1 you need to call the GETVISIBLEMAPEXTENT before using GETDYNAMICOVERLAYIMAGE. http://trac.osgeo.org/mapguide/wiki/MapGuideRfc56 IIRC there is an option to toggle MGOS 2.1 and 2.0 in the OL mapguide layer class. Even if you think fusion is a bit much, perhaps you can try setting up a sample map/layout and toggle a layer to see if the request(s) sent to MG is different than what you are sending? Regards, Kenneth Skovhede, GEOGRAF A/S On 02-03-2010 10:31, du wrote: sorry - misunderstanding. All of the layers are set to visible in Maestro ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Impossible Get Entry Point 'CSharp_MgSiteConnectionToMgGuardDisposable' in DLL 'MapGuideUnmanagedApi'
There were some changes to the MapGuide Unmanaged dlls between 2.0 and 2.1. You need an updated MapGuideDotNetApi: http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/MapGuideDotNetApiVersions Regards, Kenneth Skovhede, GEOGRAF A/S On 01-03-2010 17:18, carls wrote: I have just uninstalled MGOS2.0 and installed MGOS2.1 on Vista. It runs very well. I can access MSOS server and view the map with Maestro r4586. But if I intend to access the server with LocalNativeConnection of MaestroAPI (The code is as follows), one exception will be thrown. Impossible Get Entry Point 'CSharp_MgSiteConnectionToMgGuardDisposable' in DLL 'MapGuideUnmanagedApi' If use 'HttpServerConnection', it runs normally. I serched the forum and found some discussions, but no suitable answers for me. thanks for any helps! // /* Code */ public ServerConnectionI Connect() { if (string.IsNullOrEmpty(SessionID)) { if (UseLocalConnection){ m_Conn = new LocalNativeConnection(LocalConfigFile, UserName, Password, System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName); } else m_Conn = new HttpServerConnection(new Uri(ServerURI), UserName, Password, System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName, true); m_Conn.AutoRestartSession = true; SessionID = m_Conn.SessionID; } else if (m_Conn ==null) { if (UseLocalConnection) m_Conn = new LocalNativeConnection(SessionID); else m_Conn = new HttpServerConnection(new Uri(ServerURI), SessionID, Locale, true); m_Conn.AutoRestartSession = true; } return m_Conn; } - Regards, Carl SHE ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: How to change Existing Max scale for a layer
You are issuing MgMap.Save, but passing the layer id. You must pass the mapname when using that method. Regards, Kenneth Skovhede, GEOGRAF A/S On 01-03-2010 08:07, SriRam007 wrote: Hi, As u told to create a new MgLayer instance, and copy all the properties from the original MgLayer to the new MgLayer. Then remove the original MgLayer and insert the new one in the same position as the previous one. I m doing like this. Please tell me is there any wrong Showing error "An exception occurred in the XML parser." String uniqueName = this.MakeUniqueLayerName(map, myLayerName); MgResourceIdentifier layerResId = new MgResourceIdentifier("Session:" + Session["ID"].ToString() + "//" + uniqueName + ".LayerDefinition"); MgByteReader reader = new MgByteReader(layerDefinition, "text/xml"); resourceService.SetResource(layerResId, new MgByteReader(layerDefinition, "text/xml"), null); MgLayer newLayer = new MgLayer(layerResId, resourceService); newLayer.SetName(uniqueName); newLayer.SetLegendLabel(layer.GetLegendLabel()); newLayer.SetDisplayInLegend(layer.GetDisplayInLegend()); newLayer.SetVisible(true); newLayer.SetSelectable(layer.GetSelectable()); layers.Insert(layers.IndexOf(layer), newLayer); newLayer.ForceRefresh(); map.Save(resourceService, layerResId); //Error Comming "An exception occurred in the XML parser." Here i am just replacing the new layer at the preveous layer's position thanks ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] How to change Existing Max scale for a layer
How is it not working? Regards, Kenneth Skovhede, GEOGRAF A/S On 26-02-2010 08:39, SriRam007 wrote: hi everyone, Can i change the Max scale for a Layer using MGOS and C#.net. I have modified the XML file of Layerdefinition for changing the scale dynamically. My Scale Range Details for a layer are as below - Range From To - 101 21 2 32 5 Here highest maxscale is 5 If i am changing the max scale value anywhere below 5 then its working but if i give beyond 5 for the max scale then it is not working. please give me any idea for this thanks in advance ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: ECW Raster too big??
I have added it with simply a path to the ECW file. Have you tried the debugging link I sent you? Regards, Kenneth Skovhede, GEOGRAF A/S On 24-02-2010 15:48, pilchid wrote: Can I ask you how you went about loading up your ECW's? Perhaps you go about it a different way? Matt ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] ECW Raster too big??
I have no problems displaying 4gb+ ECW files. Are you sure this is not a coordinate system issue? Have you tried debugging the setup: http://trac.osgeo.org/fdo/wiki/FdoGdalNotes Regards, Kenneth Skovhede, GEOGRAF A/S On 24-02-2010 15:29, pilchid wrote: Hello there. I have some ariel photography that I want to sisplay within my map viewer. The file is quite big however - just over 3 Gig. I loaded the file into an alias file and made a raster feature code connection through that. I thought It was going well as it seemed to preview in mapguide ok, but when it comes to displaying on the intranet it a no go. All my other layers are fine so it doesnt time out the map. The layer is visiable in the side plane, just doesnt physically appear. If I just randomly click in the map, where it normally says 'done' it comes up with a message says (1 item remaining) Downloading picture http:// etc etc Im I going about this all wrong? Look forward to hearing from someone. Matt ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically
The change should be "permanent" until the end of the session (eg. press F5 or similar). If you want every new session to use the label, you have to modify the MapDefinition to use the modified layer. In this case, it is easiest to simply modify the LayerDefinition Xml. Open, modify, save. When you modify the LayerDefinition xml directly, all current users will see the change after a map redraw, as well as all new users. IMO, it is confusing if the display changes without the user doing anything. Regards, Kenneth Skovhede, GEOGRAF A/S On 23-02-2010 13:03, SriRam007 wrote: changing the feature label but temporarly. Can't we make it permanently. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically
The second to last line, you set the layer to point at the original, not the copy. Change the line to: layer.SetLayerDefinition(layerResId, resourceService); Regards, Kenneth Skovhede, GEOGRAF A/S On 23-02-2010 12:39, SriRam007 wrote: Utility.InitializeWebTier(Request); string myLayerName = "Districts"; MgUserInformation userInfo = new MgUserInformation(Session["ID"].ToString()); MgSiteConnection siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo); MgResourceService resourceService = siteConnection.CreateService(MgServiceType.ResourceService) as MgResourceService; MgMap map = new MgMap(); map.Open(resourceService, "Sheboygan"); MgLayerCollection layers = map.GetLayers(); ArrayList layerNames = new ArrayList(); MgLayer layer = Utility.GetLayerByName(map, myLayerName); string s = layer.GetLayerDefinition().ToString(); MgResourceIdentifier resId = new MgResourceIdentifier(layer.GetFeatureSourceId()); MgResourceIdentifier layerDefResId = layer.GetLayerDefinition(); MgByteReader byteReader = resourceService.GetResourceContent(layerDefResId); string layerDefinition = ReplaceXMLValue(byteReader); MgResourceIdentifier layerResId = new MgResourceIdentifier("Session:" + Session["ID"].ToString() + "//Districts.LayerDefinition"); MgByteReader reader = new MgByteReader(layerDefinition, "text/xml"); resourceService.SetResource(layerResId, new MgByteReader(layerDefinition, "text/xml"), null); layer.SetLayerDefinition(layerDefResId, resourceService); map.Save(resourceService); Please tell where i went wrong... thanks waiting for ur reply... ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically
Yes, its called SetResource, and the code looks correct to me. Regards, Kenneth Skovhede, GEOGRAF A/S On 23-02-2010 10:03, SriRam007 wrote: there is no "SetResourceContent" forgive me if i m saying wrong... MgResourceService resourceService = siteConnection.CreateService(MgServiceType.ResourceService) as MgResourceService; MgByteReader byteReader = resourceService.GetResourceContent(layerDefResId); --For getting the XML For saving I m doing like this ---> MgResourceIdentifier layerResId = new MgResourceIdentifier("Session:" + Session["ID"].ToString() + "//Districts.LayerDefinition"); MgByteReader reader = new MgByteReader(layerDefinition, "text/xml"); resourceService.SetResource(layerResId, new MgByteReader(layerDefinition, "text/xml"), null); map.Save(resourceService); thanks ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Sessions on server side
I see that you have found the problem with the selection object as well :). I have been quite annoyed with that many times myself. You can actually save and restore the RuntimeMap (and selection data). If you do this, a side effect is that the object id's are not re-generated. I use this frequently, because MgMap.Create takes too long in my solutions. To do this, you need to convert the name of the map into a resource id, eg. mapName = "MAP", the resource id becomes: Session://MAP.Map If you apply GetResourceContent to this, you get an xml document with "" as the only content. You must then issue the EnumerateResourceData on the resourceId, and you should be able to see the map, the layers and the darned selection resource. You can download these with GetResourceData. They are binary objects, and internal to MapGuide. I have written a helper class to read/write them here: http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/RuntimeClasses http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/BinarySerializer You can simply store these files on disk. When you start a session, you can revert the process, and create the "" resource, and call SetResourceData to upload the files. The binary files are a copy of the MapDefinition (and some of the FeatureSource/LayerDefinition stuff), so if you change the MapDefinition/LayerDefinition/FeatureSource, you must re-generate the binary files. Using this approach, you can skip the _map.Create call, and thus get "static" object id's. If you use the MaestroAPI reader/writer, you can also set the object id's. Regards, Kenneth Skovhede, GEOGRAF A/S On 22-02-2010 22:08, Pietro Ianniello wrote: "Ok, I can see that I misjudged your experience level completely" No problem :-), I see that there are many questions about things such as "Can I use images in MapGuide" and such, wich are all answered in MapGuide developer guide [wich should be printed and read ,and re-read... and re-re-read!]. If you are intersted, you can download the attachment from http://n2.nabble.com/Sessions-on-server-side-td4612873.html It assumes MapGuide OS installed in "C:\OSGeo" so "webconfig.ini" in "*C:\OSGeo\MapGuide\Web\www*", with the .NET viewer. If it is in another place, the file "*MgSheboyganCacheHelper.cs*" at line 61 bust be accordingly changed. A better approach is to use the following function (as I do in my assembly that controls MapGuide): //call CLASSNAME.SetIniPath("/mapguide/"); public static void SetIniPath(string strMGVirtualDirectoryPath) { string physicalpath = HttpContext.Current.Server.MapPath(strMGVirtualDirectoryPath); _strWebconfigPhysicalInipath = physicalpath + "webconfig.ini"; _strIniBasePhysicalPath = physicalpath; _strWebconfigWebInipath = strMGVirtualDirectoryPath + "webconfig.ini"; _strIniBaseWebPath = strMGVirtualDirectoryPath; } wich assumes the following members [default initialized]: protected static string _strWebconfigPhysicalInipath = "C:\\OSGeo\\MapGuide\\Web\\www\\webconfig.ini"; protected static string _strIniBasePhysicalPath = "C:\\OSGeo\\MapGuide\\Web\\www\\"; protected static string _strWebconfigWebInipath = "http://localhost/mapguide/webconfig.ini";; protected static string _strIniBaseWebPath = "http://localhost/mapguide/";; My solution works, and I like it. I only have concerns about scalability: what will MapGuide do when there are multiple requests with the same session? Will it queue them properly as if sessons where al different? A further explanation on why I use such a thing. I use MapGuide with Openlayers. OpenLayers can request "showLayers","hideLayers". I set up maps with all layers default invisible. The I "activate" the layers I want to see in javascript using the two OpenLayers option just mentioned. This could be done on server side, but in this case the state of the map would be stored in session [/layer.SetVisible(true);map.Save();/], and, furthermore, my idea is that if something can be done on the client, do it on the client and save computation on the server. The proble with "showLayers/hideLayers" is that they need "ObjectId" of the layer. So to give that id you must do something like: /_map.GetLayers().GetItem("").GetObjectId();/ and this must be done on every session expiration. So when in my solution [the real, not the posted one] I recreate the server side mantained "cache" of session, I recreate a list with these ObjectId. If my solution doesn't scale well, the alternative is to recreate OpenLayers' layers with a new session and store in javascript the new ObjectIds. This
Re: [mapguide-users] Re: Problem with Studio 2010 +Flexible layouts Error
It sounds as if your bounds are incorrect? (on the MapDefinition you can set the bounds). You could also have a problem with mismatch between the FeatureSource coordinate system, and map coordinate system. Regards, Kenneth Skovhede, GEOGRAF A/S On 23-02-2010 06:01, padmini godavarthi wrote: Hi mark, Thanku very much for your reply can u plz clarify some of my doubts 1) After clicking "show in browser" i got a map posted previously.After Zooming the map may times it comes to original data .I have set the coordinate system in my map definition is UTM83-11 (UTM with NAD83 datum, Zone 11, Meter; Central Meridian 117d W) which is correct to my shape file. and my application defintion is http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xsi:noNamespaceSchemaLocation="ApplicationDefinition-1.0.0.xsd"> MapGuide true Library://state/layer.MapDefinition true 0xFFA0 TaskContextMenu ContextMenu Widget menuMeasure Widget menuBuffer MapContextMenu ContextMenu Widget menuRefreshMap Separator Widget menuPan Widget menuZoomInRectangle Separator Widget menuZoomInFixed Widget menuZoomOutFixed Separator Flyout Zoom Open the zoom menu Widget menuInitialMapView Widget menuPreviousView Widget menuNextView Widget menuInitialMapScaleAndCenter Widget menuZoomSelection Separator Widget menuSelect Widget menuClearSelection Flyout Select More Open the select menu Widget menuSelectRadius Widget menuSelectPolygon Widget menuSelectWithin Separator Widget menuBuffer Widget menuMeasure Separator Widget menuViewOptions Separator Widget menuHelp Widget menuAbout Toolbar Toolbar Widget toolbarHelp Widget toolbarAbout Widget toolbarViewOptions Widget GetPrintablePage Separator Widget toolbarSelectRadius Widget toolbarSelectPolygon Widget toolbarSelectWithin Widget toolbarClearSelection Separator Widget toolbarMeasure Widget toolbarBuffer Separator Widget toolbarRefreshMap ToolbarSecondary Toolbar Widget Select Widget Pan Separator Widget ZoomInRectangle Widget ZoomInFixed Widget ZoomOutFixed Separator Widget toolbarSecondaryInitialMapView Widget toolbarSecondaryPreviousView Widget toolbarSecondaryNextView Separator Widget toolbarSecondaryZoomSelection FileMenu Toolbar Widget MapMenu Flyout View Widget showOverviewMap Flyout Tasks Widget menuPlaceholder Statusbar Splitterbar Widget StatusCoords Widget StatusSel
Re: [mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically
Yes, you should change the node for the element. The xml format is not as documented as it should be, but there are some xsd files in the MapGuide folder that explains the technical format. To save the resource, simply call SetResourceContent, much in the same way that you called GetResourceContent to get the xml. 6) is layer.SetLayerDefinition(...) (MgLayer::SetLayerDefinition) 7) map.Save(...) (MgMap::Save) 8) GetMap().Refresh() Regards, Kenneth Skovhede, GEOGRAF A/S On 23-02-2010 08:17, SriRam007 wrote: hi, Upto 5th step is done. I got the LayerDefinition in XML format and modified the "text" tag but Could u please explain the 6th step little more. I m not getting what exactly i need to do. I am not sure should i change the "Text" tag for changing the label. "Key" ::"Name" I just replaced "Name" in place of "Key". "Name" is a another property. Finally i got that modified XML file in a string. Please guide me for the remaining steps 6) Make the layer from step 2 point to the copy of the LayerDefinition from step 5 (link 2) 7) Save the MgMap instance from step 1 8) Refresh the map on the client (developer guide) thanks ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Sessions on server side
Instead of keeping sessions, and lists of sessions, how about this: Create a "start solution.aspx" that the anonymous users get a link to. In this file, simply log in as the anonymous user on MapGuide (or whatever user you want to pose as anonymous). Redirect to the MapGuide viewer, passing SESSION=xxx to the solution, using the session id you just created. You can then keep track of how many sessions there are active, using the .Net session events: http://msdn.microsoft.com/en-us/library/ms178583.aspx I recommend that you maintain a short session timeout, and "ping" an aspx page to keep the session alive. The number of active users depend on hardware, the dataset, the user behavior, etc. You can only determine this through testing. On an infinitely fast machine, MapGuide can serve an infinite number of users. If you want something really fancy, MapGuide has some performance counters you can poll. Yes, you should call dispose, and yes, it is annoying that you cannot use using(). You can create a trac ticket, stating what you want changed, to give a better .Net experience when acessing MapGuide: http://trac.osgeo.org/mapguide/wiki/SubmitTicket Due to this problem (and other similar) problems, I have built the MaestroAPI: http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI You cannot reference a class directly without referencing the dll (eg MgException). You can use a more generic try/catch to read the description without knowing the type: try { //Bad code here } catch (Execption ex) { //Also catches MgExceptions and the like Console.Writeline(ex.Message); } Btw., your attachment did not make it. Regards, Kenneth Skovhede, GEOGRAF A/S On 22-02-2010 16:41, Pietro Ianniello wrote: Dear list, This question is for those who have knowledge of MagGuide internals. I want to be able to give access to some maps to anonymous users, in a way transparent to their session [I mean that session seems not to expire to such users]. My idea is to maintain a list of session ID on server side, let’s say 10. Then on every request I pick one of my sessions, check if it’s expired, if it is recreate the session, and then use it to serve the map. NOTE: this only for anonymous users, obviously! I would like to know: - What do you think of such a solution? - How can I calculate a good number of server side maintained sessions? The second question can be reformulated: How many concurrent request is a SINGLE MapGuide server able to serve in a reasonable time…for a typical map, let’s say for "/Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition/", because it depends from the complexity of the map. Then I would like to pose some problems I have encountered using MapGide with ASP.NET <http://ASP.NET>, witch are related to how managed classes are generated (using SWIG, I suppose). The first is that Exceptions are not [Serializable] decorated, and don’t implement the “Iserializable” interface. So if someone uses MapGuide classes inside an assembly (as I do), she cannot catch OSGeo.MapGuide.ManagedException, OSGeo.MapGuide. MgException, etc…. The second is releted to Dispose: all classes expose a Dispose function but don’t expose IDisposable interface, so we cannot use “using()”, but must always use try/finally, wich, when there are many variables, can bring to ugly code. This brigs me to the following question: I always try to Dispose ALL AND EVERYTHING. Is it correct? In my opinion if a class exposes a Dispose member, I MUST CALL Dispose. A have attached an ASP.NET <http://ASP.NET> site with an example implementation of the server side maintained sessions. It’s a little bit spaghetti, because it’s a rewrite of a different implementation… for example in the method MgSheboyganCacheHelper.GetMgMapAnonymous the MgSite is not disposed… but… should it be or when disposing the related Mgmap it will be automatically disposed [this relates to the Dispose question above]? Regards, Pietro Ianniello ___ 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
Re: [mapguide-users] Shape-Files and Joins
I have given up on joins completely, I simply cannot get them to work with anything but SDF datasources. Regards, Kenneth Skovhede, GEOGRAF A/S On 22-02-2010 11:47, Volker Drescher wrote: Hello, I have a shape file with a n:1 join to as SQL Server Database. This works fine in MGOS 2.0.2 In MGOS 2.1 some features are shown, some not. If I pan in the map other features are shown, features shown before are not shown. without the join all features are shown also in MSOS 2.1. Regards Volker** ___ 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
Re: [mapguide-users] How to upload / show raster images in mgos 2.0
There is a Maestro user guide here: http://trac.osgeo.org/mapguide/wiki/maestro/UserGuide And specific for rasters: http://trac.osgeo.org/mapguide/wiki/maestro/UserGuides/RasterFeatureSource And you may want to read this: http://trac.osgeo.org/fdo/wiki/FdoGdalNotes Regards, Kenneth Skovhede, GEOGRAF A/S On 22-02-2010 08:23, Zac Spitzer wrote: at the risk of sounding very grumpy, have you tried searching google, or looking at the various wiki's? http://www.google.com.au/search?hl=en&q=maestro+raster+upload <http://www.google.com.au/search?hl=en&q=maestro+raster+upload> please read this before posting again http://www.gerv.net/hacking/how-to-ask-good-questions/ z On Mon, Feb 22, 2010 at 6:17 PM, Shamshad Alam mailto:shams...@gisconsortium.net>> wrote: How to upload or show raster images in mgos 2.0 through mapguide maestro ? Thanks & Regards *Shamshad* ___ mapguide-users mailing list mapguide-users@lists.osgeo.org <mailto:mapguide-users@lists.osgeo.org> http://lists.osgeo.org/mailman/listinfo/mapguide-users -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 ___ 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
Re: [mapguide-users] uploading a raster image
Yes, it is possible to upload and show raster images in MGOS 2.0, although I would recommend using MGOS 2.1. Regards, Kenneth Skovhede, GEOGRAF A/S On 19-02-2010 10:42, manav dayal wrote: is it possible to upload or show raster images in mgos2.0 Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! <http://in.rd.yahoo.com/tagline_ie8_new/*http://downloads.yahoo.com/in/internetexplorer/>. ___ 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
Re: [mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically
If you look at the second link (to the documentation), the method "SetLayerDefinition" can make the layer point to another resource. As with the first example, you need to make a copy of the LayerDefinition xml. If you just modify the LayerDefinition xml without making a copy, the change will be visible for all users, current and future. Basic steps are: 1) Obtain the MgMap instance 2) Find the layer 3) Load the LayerDefinition xml (link 1) 4) Modify the FeatureLabel (link 1) 5) Save a copy of the LayerDefinition xml (link 1) 6) Make the layer from step 2 point to the copy of the LayerDefinition from step 5 (link 2) 7) Save the MgMap instance from step 1 8) Refresh the map on the client (developer guide) steps 1,2 and 7 have hints in the developer guide, but are also avalible in the API documentation under MgMap. Regards, Kenneth Skovhede, GEOGRAF A/S On 19-02-2010 10:41, SriRam007 wrote: ave given are for a new layer which is working fine and I got some help from Buffer.aspx page. But I want to change feature label for an existing layer. The layer is having 3 fields like (Id,Name,Adress) Currently its showing Id in the map. But i want to change it to name Is there any way to do so... ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically
http://lists.osgeo.org/pipermail/mapguide-users/2009-January/016165.html Yes, it is in PHP. Given that you have asked for this numerous times, and had no response, its very likely that no one has what you are asking for. Using the above link, you can see what you need to do, but in php. You will have to convert that to C# yourself. When you are done, it would be nice if you would share your work: http://trac.osgeo.org/mapguide/wiki/CodeSamples Unfortunately, not many people write up samples, which is why there is no sample for what you want to do. I find it strange that you have not mentioned the API documentation yet. Try this link: http://mapguide.osgeo.net/files/mapguide/docs/webapi/d6/de2/class_mg_layer.html Regards, Kenneth Skovhede, GEOGRAF A/S On 19-02-2010 08:21, SriRam007 wrote: Can u please post the exact link I went through all the link but still not getting anything which will be useful for me. I am using C#.Net and Javascript but some links are in PHP and some diffeerent topic are also comming i did not get which one should i use and which should be my first step Here below i m describing my requirement :: My map is having so many layers like (L1,L2,L3) so like featrues F1,F2,F3 And each feature of a layer is having some property like {F1 : (P1,P2,P3) ,F2 : (P4,P5,P6) ,F3 : (P7,P8)} and one of them already i set as feature label eg: for "F1" layer "P2" property is there as feature label But i want to change it to "P3" at runtime only. and for all feature of a layer ie layer wise Please guide me anyone thanks http://n2.nabble.com/file/n4596494/Set_Label_Feature.bmp :confused: ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Getting layer's maxscale to Viewer API
Performance of codebehind is much better, and so is the general dependency etc. If at all possible, I recommend that you use codebehind. Also, when writing ajax handlers, be sure to use .ashx as they have less overhead than the .aspx pages. In your code (regardless of where it is placed), you can either use the public variable approach I outlined, or use the "response.write" method to write data to the output stream. Try to install and use FireBug (for FireFox) or Fiddler (for IE), with either tool, you can see the data being transfered, and that should help you understand what data you are transmitting. I'm not sure why you use the JavaScripSerializer, as you already have the string in a JSON format? The value should not be enclosed in strings, eg, it should be: Dim MString as String = "{""scale:""" & MaxSC.ToString(System.Globalization.CultureInfo.InvariantCulture) & "}" Then: Response.Clear() Response.Write(MString) Response.Flush() Response.End() In the JS code, you attempt to do something directly after you issue the AJAX call. Since AJAX is async you do not yet have the data. You must wait for the data to be fetched from the server, which is what the onreadystatechanged function is for. Inside this function, you "unwrap" the JSON string into a javascript object. Your maxsc2 variable is the object, so you can call: var scale = maxsc2.scale; //Your code names the variable "double", eg: var scale = maxsc2.double; parent.KartenFrame.viewerFrame.mapFrame.ZoomToView(xcoord,ycoord,scale,true); Remember that the code after request.send() gets executed immediately, and does NOT wait for the server to finish processing. You must do all the processing inside the onreadystatechanged function. Once the data is returned, you can call the zoom function, but not before. I recommend that you also send the x/y values back and forth, so you can easily access them inside the onreadystatechanged callback. Otherwise you need to worry about function scopes and javascript enclosures (advanced JS topic). I recomend that you use some JS framework to achieve this, as that will handle function scope better than the raw method you use here. A JS framework will also give you a nice error handler, and will be cross browser. Prototype seems to be popular: http://www.prototypejs.org/api/ajax/request It's ajax request object has "onSuccess" and "onFailure", so you can give the user a nice message if the server fails, or the network link breaks. Regards, Kenneth Skovhede, GEOGRAF A/S On 18-02-2010 15:57, Johannes Foell wrote: You have exactly pointed out what i need. Unfortunately I'm using code inline and not codebehind. The first way, which you presented doesn't work in my code. As newbie to JSON i've tested your second solution, but i do'nt get the scale to the client there, too. Does anyone here knows, how to deliver a JSON-object from the server to the client? What is wrong in my code? The important lines are: In VB.NET: Sub reload (ByVal o As Object, ByVal e As EventArgs) MaxSc is the double-variable, which contains the MaxScale for the Layer. Dim MString As String = "{" + Chr(34) + "double" + Chr(34) + ":" + Chr(34) + MaxSc.ToString + Chr(34) + "}" ' e.g. the JSON-Object: {"double":"31456.57"} Dim serializer As New JavaScriptSerializer Dim json As String = serializer.Serialize(MString) End Sub In JS: function ZoomToView() { var url; //the current aspx-file var maxsc; var maxsc2; try { var request = new XMLHttpRequest(); } catch(ex) { try { var request = new ActiveXObject("MSXML2.XMLHTTP"); } catch (ex) { var request = new ActiveXObject("Microsoft.XMLHTTP"); } } request.onreadystatechange = function() { if(request.readyState == 4) { maxsc2 = eval("(" + request.responseText + ")"); //what do i have to call here? } } request.open("GET", url, true); request.send(); maxsc = maxsc2.double; //the double-field of the object maxsc -= 0.1; //to show the layer in the map parent.KartenFrame.viewerFrame.mapFrame.ZoomToView(xcoord,ycoord,maxsc,true); //the coordinates are no problem. if i set here a number as maxsc, e.g. 15000, it works } Thanks for any help. Regards, Johannes Foell Kenneth Skovhede, GEOGRAF A/S wrote: Not sure this is what you are asking but, this is how I understand your question. Basically the output of an ASPX page is html (or any format really). Since you want to output the scale, you would want the following html output: var maxScale =<%=serverGeneratedMaxScale%>; GetMap().ZoomToView(x, y, maxScale); (I've left out the GetMap() and x, y code). The<%=serverGeneratedMaxScale%> gets processed by the ASP.Net runtime, and inserts the value of the variable named &quo
Re: [mapguide-users] Re: MapGuide with ASP.Net
This usually means that the MapGuide binary dll fails to load. Check that the MapGuide binaries are in the bin folder where your app runs from. If they are, you best bet is to run ProcessMonitor to see what dll's it attempts to load. Also, the exception should have some "innerexception" or other property with more detailed info. http://n2.nabble.com/MapGuideApiPINVOKE-tp4478803p4506237.html To use ProcessMonitor, do this: 1) Install ProcessMonitor http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx 2) run "IISRESET" from the commandline 3) Start process monitor 4) Start the application, and get the error 5) Examine the w3p process and see what files it attempts to load. Regards, Kenneth Skovhede, GEOGRAF A/S On 18-02-2010 10:58, kandiyateesh wrote: Hi Kenneth, I've copied the bin folder and the webconfig.ini file as mentioned in the previous post. Also, I've referenced the same when the initialize function is called. Now, I recieve an error saying,"The type initializer for 'OSGeo.MapGuide.MapGuideApiPINVOKE' threw an exception". The following is my webconfig.ini file: -- # * # MapGuide Web Configuration File # # WARNING: BE VERY CAREFUL WHEN MODIFYING THIS FILE AS IT COULD # ADVERSLY IMPACT SERVER PERFORMANCE # * # COMMON VALIDATION INFORMATION # # (Unless otherwise noted under the property description) # - # String Property Range of String Length Reserved Characters # - # File Name0< Length<= 128 \/:*?"<>| # Folder Name 0< Length<= 128 \/:*?"<>| # Log Parameters 0<= Length<= 1024 # Password 0<= Length<= 64\t\r\n\v\f # Path 0< Length<= 255 *?"<>| # - # Numeric Property Range of Numeric Value # - # Port Number 0<= Value<= 65535 # * [GeneralProperties] # * # G E N E R A L # # Property NameDescription # - # DefaultMessageLocale ISO 639-1 name for the message locale # Length = 2 # Example: en # or # Length = 5 # Example: en-US # # WARNING: if a 5 character locale is specified # the first 2 characters must be lower # case and the last 2 characters must # be upper case. # # ResourcesPathPath where the localization resource files are stored # TcpIpMtu The TCP/IP maximum transmission unit # 0< Value<= 65535 # TempPath Path where the temporary files are stored # * DefaultMessageLocale = en ResourcesPath =http:\\\MapGuide\Web\www\mapagent\Resources TcpIpMtu = 1460 TempPath =http:\\\MapGuide\Web\Temp\ [AdministrativeConnectionProperties] # * # A D M I N I S T R A T I V E C O N N E C T I O N # # Property NameDescription # - # Port The port to use for administration operations # # WARNING: If you change the port # here you # must also change the corresponding # port # for the server configuration # file. # # * Port = 2810 [ClientConnectionProperties] # ***
Re: [mapguide-users] Re: Is it Possible to set Feature Label for a layer dynamically
Please look at search result number #2, it does not mention MaestroAPI. Regards, Kenneth Skovhede, GEOGRAF A/S On 18-02-2010 11:16, SriRam007 wrote: ell u that i m not using maestro api. I have only Mapguide Open source. Can it be done by using .net and Javascript ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Some thought on FDO PostGIS Provider
Traian: Are you sure that the OGRProvider in MGOS 2.1 is dynamically loading gdal? My stock install has a 2mb+ OGRProvider.dll and has many strings inside from the OGR library. Also, when running MapGuide and viewing OGR data, I'm able to delete the gdal16.dll. OP: I have little real-world experience with the PostGIS provider, so I can only answer the Maestro related part of your question. The word "DataStore" is what the provider exposes the parameter as. Probably because it is based on the common RDBMS code. I can change the word in the userinterface for Maestro to "Schema", but it makes it slightly harder to guess how the value is mapped. I can also change it so Maestro suggests "public" as the schema when creating a new PostGIS FeatureSource. I have recorded the requests as issue #1275: http://trac.osgeo.org/mapguide/ticket/1275 The naming issue sounds a little weird, it is supposed to be "Schema:Table", not "PostGIS:*" or "OGRSchema:*". The value listed in Maestro, is whatever the provider chooses to report. If you use the intended form (Schema:Table), you can see why Maestro cannot drop the Schema part, even if some propviders support using a default schema. Feel free to add an enhancement request for Maestro, for not including the schema part of the tablename for providers that misuse the naming scheme (and support a missing schema). The "update layers, when featuresource changes" request, is recorded as issue #1067 http://trac.osgeo.org/mapguide/ticket/1067 If there is any way you can provide reproduce able instructions for the save problem, please let me know. ***Non Maestro related follows *** Each time you start a map or something similar, MapGuide issues a DescribeSchema request. If you simply reference your entire database, this will take much longer than if you split it up in "schema" parts. I assume this is why the PostGIS provider does it this way. Obviously, the provider (or MapGuide) should be smart enough not to request all this info, but it is not. Also, if you expose your entire db, be aware that you are effectively exposing the database to the users. A rouge user can easily get MapGuide to hand over all exposed data, so the less there is avalible to MapGuide, the better. I have also built the OGR and Gdal provider with PostGIS support some time ago. I belive the build procedure is now so simple that it is just a matter of installing Visual Studio, checking out the code with SubVersion, and running the "build.bat". You only have to fiddle with the Gdal file called nmake.opts to have it include PostGIS. I would expect it to take a day or two to get a working build, if you want to try. Regards, Kenneth Skovhede, GEOGRAF A/S On 18-02-2010 06:20, Jason Birch wrote: To the OP: I understand your frusteration with getting PostGIS to work, but the fact is that it's languishing because it hasn't had enough community interest and development support. My organisation and Refractions Research funded initial development of the provider by Mateusz, but it never performed well enough to meet our needs. Following that, Geomap GIS performed some bug fixes and maintenance. Apart from that there has been very limited interest, funding, or development on this provider. It looks like there may be some light at the end of the tunnel now that Autodesk has resurrected and improved on a discarded version of the initial provider, but you won't see benefit from that until at least 2.2 if not later. To follow up on Traian's point, it's quite possible that the required GDAL and plugins are available in the OSGeo4W repository. The mapguide trac page for the GDAL provider (linked from the front page I think) links to a message showing how to add raster plugins. After some initial encouragement from Frank, all it took was a half hour or so sitting with "depends.exe" to work out what I needed in addition to gdal.dlls. I'd imagine that vector/ogr plugins work the same way. Jason On 2010-02-17, Traian Stanev wrote: Why OGR is no more built by default with PostGIS support? It never was compiled with PostGIS by default. Before, I was doing a custom build with a static link to an OGR build which has PostGIS support built in. Needless to say that takes a long time to do due to the huge dependency list and there have only been one or two people who have asked for it, so not enough demand to make it worth my time. However, since the default build now uses dynamic link to the GDAL DLL, you should be able to replace the Gdal.dll with one that has PostGIS support compiled in it and automatically get PostGIS support. That said, if you know an URL with OGR dll compiled with PostGIS support, in a version compatible with Mapguide, I would rather try them, before starting editing the 1000 layers... I only have such builds f
Re: [mapguide-users] CONFIG.XML EDIT DYNAMICALLY?
That sounds sensible, but why do you need to filter the list? Is it too slow with 14,000 nodes in the xml? Regards, Kenneth Skovhede, GEOGRAF A/S On 16-02-2010 18:30, GordonL wrote: Hi All, I have a layer that points to a folder of rasters. I want to filter that layer based on the filename of the raster (dynamically). Do I need to dynamically alter the config.xml? If so, how would I do it? Some thing like this? 1. Get Raster Datasource. 2. Get Config.xml of datasource. 3. Modify config, delete all child nodes of where the name does not equal the filename I need. 4. SetResource of the raster feature source with the modified config 5. Refresh the map. Does this make sense? Is there an easier way to do this? My issue is that I have 14,000 images. thanks gordon View this message in context: CONFIG.XML EDIT DYNAMICALLY? <http://n2.nabble.com/CONFIG-XML-EDIT-DYNAMICALLY-tp4581567p4581567.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@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
Re: [mapguide-users] IIS 7.0 Forbidden when opening /mapguide/ (frombrowser and Maestro)
Under "server extensions" in IIS, you have to enable the isapi_mapagent.dll file. If it is not already enabled, add a new extensions, and browse to the file: C:\Program Files\OSGeo\MapGuide\Web\www\mapagent\isapi_mapagent.dll On the mapguide/mapagent virtual folder in IIS, select properties and configure. Make sure the .fcgi points to same file as above. In the "server extensions" there should be no " around the path, in the virtual directory configuration, there should be " around the path. If it does not work, try using the mapagent.exe instead: C:\Program Files\OSGeo\MapGuide\Web\www\mapagent\mapagent.exe It has worse performance, so you shouldn't keep it enabled. I have also seen a case where removing and adding the extension and mapping made the 500 problem go away. Regards, Kenneth Skovhede, GEOGRAF A/S On 16-02-2010 14:44, Bojan Franc @ FER wrote: The suggested link http://server.ip/mapguide/mapagent/mapagent.fcgi gives me... 500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed. I tought there was a problem with permissions reading the folder, but seems that is not the case. Do I have to "enable" fcgi in IIS configuration or something similar? Regards, B. Franc - Original Message - From: "Kenneth Skovhede, GEOGRAF A/S" To: Sent: Tuesday, February 16, 2010 12:40 PM Subject: Re: [mapguide-users] IIS 7.0 Forbidden when opening /mapguide/ (frombrowser and Maestro) Try entering the full url into Maestro: http://server.ip/mapguide/mapagent/mapagent.fcgi If you use the shorter version, Maestro will attempt to use that first, then try to append "mapagent/mapagent.fcgi", but if the second attempt also fails, you get the error from the short one. Regards, Kenneth Skovhede, GEOGRAF A/S On 16-02-2010 10:30, bojanfr...@fer wrote: Hi, I was running MGOS with Apache so far, now want to use it with IIS. A got a IIS configuration error somewhere, I think... I can open MapAdmin and MapAgent with no problems. http://server.ip/mapguide/mapadmin ... redirects me to login.php and works OK... http://server.ip/mapguide/mapagent ... works OK But when I try to open http://server.ip/mapguide/ from browser or connect from Maestro, I get ... 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. I am using IIS 7.0 on a Win2008 R2 server. It's a clean install, I only changed some options in IIS to get PHP working. What am I missing? Regards, B. Franc ___ 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
Re: [mapguide-users] IIS 7.0 Forbidden when opening /mapguide/ (from browser and Maestro)
Try entering the full url into Maestro: http://server.ip/mapguide/mapagent/mapagent.fcgi If you use the shorter version, Maestro will attempt to use that first, then try to append "mapagent/mapagent.fcgi", but if the second attempt also fails, you get the error from the short one. Regards, Kenneth Skovhede, GEOGRAF A/S On 16-02-2010 10:30, bojanfr...@fer wrote: Hi, I was running MGOS with Apache so far, now want to use it with IIS. A got a IIS configuration error somewhere, I think... I can open MapAdmin and MapAgent with no problems. http://server.ip/mapguide/mapadmin ... redirects me to login.php and works OK... http://server.ip/mapguide/mapagent ... works OK But when I try to open http://server.ip/mapguide/ from browser or connect from Maestro, I get ... 403 - Forbidden: Access is denied. You do not have permission to view this directory or page using the credentials that you supplied. I am using IIS 7.0 on a Win2008 R2 server. It's a clean install, I only changed some options in IIS to get PHP working. What am I missing? Regards, B. Franc ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Getting layer's maxscale to Viewer API
Not sure this is what you are asking but, this is how I understand your question. Basically the output of an ASPX page is html (or any format really). Since you want to output the scale, you would want the following html output: var maxScale = <%=serverGeneratedMaxScale%>; GetMap().ZoomToView(x, y, maxScale); (I've left out the GetMap() and x, y code). The <%=serverGeneratedMaxScale%> gets processed by the ASP.Net runtime, and inserts the value of the variable named "serverGeneratedMaxScale" in th output. In your codebehind file, just declare a public instance variable with that name, and insert the above code in the aspx (below the codebehind declaration), and it should come out. Another slightly more sophisticated way of doing this, is to issue and AJAX call and have the page return a JSON object string like: {x: 333, y: 444, maxScale: 555} Then in your Ajax callback handler do this: var obj = eval('(' + responseText + ')'); GetMap().ZoomToView(obj.x, obj.y, obj.maxScale); I can't remember what the AJAX stuff is called in the viewer, but there are plenty of free AJAX helper code avalible online. The benefit of using an AJAX call is that the user cannot pres "back", there is no "click" sound, and you don't need to mess with hidden frames. Regards, Kenneth Skovhede, GEOGRAF A/S On 15-02-2010 16:25, Johannes Foell wrote: Hi List, I'm new to MG (and JS) and have a question about the layer's maxscale. I can read the maxscale out of the Layerdefinition using a XML-File. Having the maxscale read out for each layer, I need the highest maximum for the layergroup at the Viewer API to zoom to a given coordinate and this maxscale. Currently i compare the different maxscales and save the largest number as double. Writing this double to a new XML-File, i can't read it to the Viewer API. Is there a way to get this maxscale to the Viewer API and the method ZoomToView()? I'm using VB.Net and JS. Or is there just another solution? Thanks for any hint in advance. Best regards, Johannes Foell ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Buffer is not working properly
The picture is too low resolution, I cannot read the parcel Id's in the list or on the map, so I can't see if the result is plausible. Your post title is "Buffer is not working propertly", according to the picture, the buffer operation works fine. In your code, you seem to re-buffer the selected parcels, and then issue "Select Within" on the same layer, is that correctly understood? What provider are you using (sdf, postgis, etc.)? You could try to select the affected items, as that will visually show what happens. Regards, Kenneth Skovhede, GEOGRAF A/S On 16-02-2010 08:18, padmini godavarthi wrote: selection.GenerateFilter(layer, LayerClassName) ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: MrSid, ECW MGOS 2.1 and Maestro 2.0 RC 1
FYI, there is a license governing those files, which is why they are not easily avalible. I'm not sure about distribution rules, but there are rules regarding usage. IIRC you can use them freely (royalty free) for reading, but not writing. You should verify that you use the files in compliance with the license yourself, before using the files in production. Regards, Kenneth Skovhede, GEOGRAF A/S On 13-02-2010 20:18, wordsy wrote: Thanks. I will put these files in the correct folder. Hopefully, everything will work. Thanks again for all your help everyone! ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: "Failed to read schema..." error with GDAL
The error message "failed to read schema" means that the "DescribeSchema" operation gave an error. As you can perform the "DescribeSchema" operation fine manually, there is likely an error in Maestro. I have modified Maestro to pick up a better (longer) description of the error. You need to install the preview version of Maestro before you can try the modification. The preview version is avalible for download on the usual download page, just scroll down a bit. Once installed, repeat what you have done so far, and there should now be more information, if you click "About" -> "Last exception". If you email me the content of the "Last Exception" window, I will attempt to fix the problem. The purpose of the "DescribeSchema" operation is to fill the combo boxes in the editor. As they are filled correctly, the error message is likely a cosmetic issue (eg. it can be ignored). I used the "GMARBLES.tiff" from this page: http://www.fileformat.info/format/tiff/sample/index.htm But it is not a realistic TIFF file, as it has no spatial context. Given the information that you can select the raster schema/column, I belive Maestro does what it is supposed to. You can look in the xml, to see if there is something obvious missing. If the xml looks correct, it is likely a problem with your GDAL configuration. You can look in MapGuide's error.log for hints, alternatively try this guide: http://trac.osgeo.org/fdo/wiki/FdoGdalNotes Look under "Debugging rasters in MapGuide" Regards, Kenneth Skovhede, GEOGRAF A/S On 05-02-2010 13:23, magnoliazz wrote: Hi Kenneth, How can I do that? I'm sorry, but could u provide a lil more details cause I'm still a newbie in this. And would you have a sample raster that works for you that you can send me, or a link to download it from. I have reinstalled the Gdal binaries, but in vain. I just want to know where does the problem come from, is it the provider, tha raster file or the software itself. The error message says that it failed to read schema from data source, what do u think this means? ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Map editing on web application
It would require a serious amount of work to implement the OpenLayers editing tool in the WebLayout. AFAIK, there has been no work in this direction publicly disclosed. You may be able to get away with putting an OpenLayers overlay on top of the MapGuide map, and then edit in that, but there will likely be some sync issues. Regards, Kenneth Skovhede, GEOGRAF A/S On 07-02-2010 13:14, isca wrote: And is there any chance to bring this functionality towards the basic weblayouts ? I still prefer these as they are in my opinion much more stable and performant, but on the other hand the editing in openlayers/fusion is just great ... ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: MapGuideApiPINVOKE
Ok, it was as I suspected then. You correctly load the MapGuideDotNetApi.dll, but it cannot call MapGuideUnmanagedApi.dll. The error message 0x8007007F seems to indicate that the dll itself was found, but it is missing a method. I'm unsure if the "missing method"-error means that the dll itself is broken, or the method is simply missing. Try using a tool such as "Process Monitor" to see what dll files it is actually reading: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx Regards, Kenneth Skovhede, GEOGRAF A/S On 03-02-2010 10:25, Gunter Becker wrote: The InnerException is: 'The type initializer for 'SWIGExceptionHelper' threw an exception' The InnerException of this Exception sounds a little bit weird (it's in german but I try to translate): 'The DLL "MapGuideUnmanagedApi": procedure could not be found. (Exception from HRESULT: 0x8007007F) cannot be loaded.' Please take a look at this screenshot to see the original http://n2.nabble.com/file/n4506237/Exception.jpg exception text (german). Thanks in advance , Gunter ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: problem when using same code for MapGuideEnterprise2009 with MapGuideEnterprise2010
This does not reveal to me what the error is. Which lines are around line 56 mentioned in the error message? Have you verified that all your variables are initialized (the error indicates otherwise)? Regards, Kenneth Skovhede, GEOGRAF A/S On 03-02-2010 04:33, ehsan wrote: search for NOLOT,Select the area and zoom to selection. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: MapGuideApiPINVOKE
Not sure why Signer.exe fails, but are you sure you can run corflags.exe and ildasm.exe from the command prompt? Could you examine if the "InnerException" holds more info: http://dotnetperls.com/typeinitializationexception The fact that the error message mentions "MapGuideApiPINVOKE" makes me think that it has loaded the MapGuideDotNetApi.dll just fine, but something else is breaking. Since "MapGuideApiPINVOKE" is used to invoke the binaries, I assumed they were of the wrong type. Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 10:27, Gunter Becker wrote: Kenneth, thanks for your reply. No, I don't think so because I tested it on another Windows Server 2008 / 32Bit and it works well. Next thing I tried was to use your signed MapGuideDotNetAPI.dll you posted some days ago. This also doesn't work. And then I tried to sign the MapGuideDotNetAPI.dll by myself with the Signer.exe you mentioned in a former thread. I dit it directly on the server in the Visual Studio 2008 Command Prompt and it fails with the following message: c:\Tmp\MaestroKey>Signer -k c:\tmp\MaestroKey\maestroapi.key -outdir c:\tmp\MaestroKey\Strong -a MapGuideDotNetApi.dll Execute of corflags.exe failed Execute of ildasm.exe /? failed An unexpected processing error did occur: System.NullReferenceException: Object reference not set to an instance Maybe it is an .NET issue? What else can I try? Thanks, Gunter ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: "Failed to read schema..." error with GDAL
Are the files resonable size (eg. less than 10mb) so you can send one to me for testing? Otherwise, please try this page: http://localhost/mapguide/mapagent/index.html Click on "Feature", then "Describe Schema". Just fill out the ResourceId with the ResourceId of the raster item, and click submit. The username/password is what you would use to login to Maestro. If you post the result of that operation somewhere, I will have a look, and see if I can guess what the problem is. Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 12:56, magnoliazz wrote: release of Maestro and I'm having the same problem. I get the same erro message, no log entries, no last exception to view, and when I add the raster layer I get a blank map. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: mapguide-users Digest, Vol 38, Issue 1
There is no detailed info, the only document is the user guide: http://trac.osgeo.org/mapguide/wiki/maestro/UserGuide Are you using the Maestro 2.0 RC1 ? If not, try it. If yes, can you post the entire message (if there is more) ? Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 12:35, hanane el yazidi wrote: I'm a MGOS novice. I'd like to add a raster (.tiff) with Maestro, so I added an alias pointing to the directory where the raster is located, then I added a dataconnection with the FDO Gdal provider, tested the connection, and it was good. But when I want to add the raster layer, I get this error: "/Failed to read schema from data source. The operation gave the error message: Value cannot be null. Parameter name: input"/. What am I doing wrong? is there some detailed documentation about the use of raster data in maestro. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Configuration Error in MapviewerNet in MGOS 2.1
You are mixing the MaestroAPI and the regular API. When you create a MaestroAPI connection, it automatically creates a session for you. You can read the sessionId from the conn variable. In your code, you will create two sessions. You can either remove the MgUserInformation and related code, or create the HttpServerConnection with the sessionid instead of the username/password. The variable "layout" is of type WebLayout, yet you use it in a querystring. The "&WEBLAYOUT=" should hold the resourceId, not the object. A simple fix would be to change the line to: Hi kenneth, Thanks for your reply.i have passed the input parameters to the ajaxviewer.aspx .but is shows the result as invalid repository type invalid repository type in browser . just see my code Public sessionId As String Public webLayout As String Dim resrce As ResourceIdentifier Public layout As WebLayout Dim realPath As String = Request.ServerVariables("APPL_PHYSICAL_PATH") Dim configPath As String = realPath + "webconfig.ini" MapGuideApi.MgInitializeWebTier(configPath) Dim userinfo As MgUserInformation = New MgUserInformation("Administrator", "admin") 'Dim mgsiteconn As MgSiteConnection = New MgSiteConnection() Dim site As MgSite = New MgSite() site.Open(userinfo) sessionId = site.CreateSession() Dim host As Uri = New Uri("http://localhost/mapguide/mapagent/mapagent.fcgi";) Dim conn As HttpServerConnection = New HttpServerConnection(host, "Administrator", "admin", "en", True) layout = conn.GetWebLayout("Library://sample/Layout.WebLayout") resrce = New ResourceIdentifier("sample", ResourceTypes.WebLayout, sessionId) conn.SaveResourceAs(layout, resrce) HttpContext.Current.Session("sid") = sessionId HttpContext.Current.Session("layout") = resrce and in source file(default.aspx) is any thing wrong in my code?? Regards, Padmini G. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem zoomtoview in mapguide 2.1
If I open the page, and type "kerk" and press "zoek", I get a javascript error, "soort is not defined": j=soort.length; //alert(j) Try installing FireFox and Firebug to track the error. (you need to define variables before using them). Also, you split a string giving you an array of strings. You then pass strings into the ZoomToView function. Depending on how its processed, you will get really weird results, eg: var xc = "5"; xc += 5; alert(xc); //Shows "55", NOT "10" Try using parseInt(): xc = parseInt(ar[0]); yc = parseInt(ar[1]); This mat have worked in previous versions, as they only used x/y to send to the server, and then parsed the results. Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 12:09, Rico van Driel wrote: Hi List, I have an search adres application that uses the ZoomToView function as mentioned below. In previous MGOS versions this function works fine. In MGOS 2.1 this function works also but after execution the standard functions from mapguide does work anymore. For example if you pan the map you will see a response from mapguide but the map will be blank. function showAdres(value) { // alert(window.top.ViewerFrame.mapFrame.name); ar = value.split("-"); xc = ar[0]; yc = ar[1]; // alert(xc); window.top.ViewerFrame.mapFrame.ZoomToView(xc,yc,500,true); } See for example http: http://213.154.241.184/sites/lochem/index2.php (type 'kerk' and press "zoek" button, select address from list. After zooming select for example the pan function and see what happens) After zooming to a address. The image shown is correct. But if I look to the X, Y cooridinates shown left below, they are not correct. On nable I can only find this post: http://n2.nabble.com/Couple-of-potential-bugs-in-MapGuide-2-1-API-AjaxViewer-td2610344.html#a2610344 I tried adding the numberValue = numberValue - 0; line to the mainframe.templ file but this does not seem to work. Annyone other suggestions? met vriendelijke groet, GIS/^kit /^ BV Rico van Driel GIS^kit BV Postbus 489 3990 GG Houten De Molen 15 3994 DA Houten Tel: 030-6340430 Fax:030-6342433 email: _i...@giskit.nl <mailto:i...@giskit.nl>_ www: _http://www.giskit.nl <http://www.giskit.nl/>__ _ Op al onze aanbiedingen en overeenkomsten zijn de algemene voorwaarden van FENIT, gedeponeerd ter Griffie van de Arrondissementsrechtbank te Den Haag op 3 juni 2003 onder nummer 60/2003 van toepassing. Een exemplaar zenden wij u desgewenst kosteloos toe. http://www.giskit.nl/> ___ 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
Re: [mapguide-users] Re: Configuration Error in MapviewerNet in MGOS 2.1
You cannot open ajaxviewer.aspx directly, it needs some parameters as input, eg. a WEBLAYOUT= Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 11:49, padmini godavarthi wrote: Hi kenneth, Thanks for ur reply.while browsing mapviewernet from iis a list of aspx files are diplayed. while clicking on ajaxviewer.aspx a got a following error that Error in base64DecodeInvalid length for a Base-64 char array. what is this error actually?what i have to do for the solution? Regards, Padmini G. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Configuration Error in MapviewerNet in MGOS 2.1
There is a big button labeled "Create", press it. Alternative: http://www.google.com/search?q=How+to+configure+virtual+directory+as+an+application+in+IIS Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 09:59, padmini godavarthi wrote: Hi, Thanks for your reply.How to configure virtual directory as an application in iis.can u plz tell me the procedure.my iis is as follows.. http://n2.nabble.com/file/n4499669/prop.jpg Regards, Padmini G. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] RE: ECWs and MG 2.1
Otherwise you need to sign up on the erdas page, wait for login info on email, download and install the SDK. You can then extract the dll files from the install dir. Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 09:41, Jason Birch wrote: I believe that Frank distributes ECW redistributables as part of FWTools, but it might be a bit of a struggle to find the right ones :) http://home.gdal.org/fwtools/ Jason On 2 February 2010 00:16, gatopardo <mailto:luis.diosd...@dossoftware.com>> wrote: Hello, where can I obtain these files? NCScnet.dll NCSEcw.dll NCSEcwC.dll NCSUtil.dll I've mailed Erdas, but they don't anwser. ___ 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
Re: [mapguide-users] Map editing on web application
By "edit" do you mean interactive edit of the feature? eg. add points to a polygon and move them around? If so, you can use OpenLayers (or Fusion/Flexible Layouts): http://openlayers.org/dev/examples/modify-feature.html There is no support for interactive editing in the basic weblayouts. Regards, Kenneth Skovhede, GEOGRAF A/S On 01-02-2010 13:24, prabhat30 wrote: Hi, Iam trying to edit existing feature class on web application using open source mapguide(c#). Whether it is possible or not. If not give me any alternate solutions to solve this problem. Thanks in advance Regards Prabhat ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Guide Me in MGOS 2.1
I have no idea about the aspnet_regiis problem, I have never seem that myself. You can use Visual Studio Express if you prefer, there are no issues that I'm aware of. Regards, Kenneth Skovhede, GEOGRAF A/S On 31-01-2010 13:54, padmini godavarthi wrote: Hi, Thanks for your reply. can u plz tell me what is the reason for Application error in apnet_regiis.exe 1)can i do development in visual studio 2008 Express Edition?or is there any problem? Regards, Padmini G. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] problem when using same code for MapGuideEnterprise2009 with MapGuideEnterprise2010
Most code will work just fine when upgrading, but if your code depends on an undocumented feature or bug, it may not. You need to give more information, perhaps post some of the script. Regards, Kenneth Skovhede, GEOGRAF A/S On 01-02-2010 08:25, ehsan wrote: Hi, i just changing my MapGuideEnterprise2009 to MapGuideEnterprise2010, i had some trouble with my PHP code when use it in MapGuideEnterprise2010. Before i use the MapGuideEnterprise2009, i use the MapGuide Open Source 2.0, the code that i make is to search for NOLOT, select and zoom to selection in the map, then the same code i use in MapGuideEnterprise2009 and it work well. but when i use the MapGuideEnterprise2010 it seem does not work at all. when i use the in Internet Explorer get this error Webpage error details Message: Object expected Line: 56 Char: 1 Code: 0 URI: http://localhost:8008/mapguide2010/phpsamples/Build/Search%20Query%202.php?SESSION=349b6ad6-f130-102c-8000-001b246a1fcd_en_7F010AF20AF10AF0&WEBLAYOUT=Library%3A%2F%2Fgis%2Flayoutmelaka.WebLayout&DWF=0&LOCALE=en&NOLOT=3475&LAYER=Lot Tanah Melaka&DAERAH=03&MUKIM=Sungei Baru Ulu when i check at my code at line 56, the code is: Is MapGuideEnterprise2010 can not use the same code from the MapGuideEnterprise2009? Thanks. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Configuration Error in MapviewerNet in MGOS 2.1
From your error description: *This error can be caused by a virtual directory not being configured as an application in IIS*. Have you configured the virtual directory as an application? Regards, Kenneth Skovhede, GEOGRAF A/S On 02-02-2010 06:23, padmini godavarthi wrote: Hi, iam using MGOS 2.1 and Maestro 1.0.9 on IIS 6.0 vs 2005 express edition on Windows XP I have installed MGOS 2.1 and maestro 1.0.9 and created a package.the map is diplaying fine by show in browser But while developing a sample application i got the following error. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Source Error: Line 44:by Microsoft that offers a single logon and core profile services for member sites. Line 45: --> Line 46: Line 47: Line 48: Source File: C:\Program Files\OSGeo\MapGuide\Web\www\mapviewernet\web.config Line: 46 so inorder to check mapviewernet is working or not i just typed http://localhost/mapguide/mapviewernet/ajaxviewer.aspx but the same error occurs.iam sending the error screenshot so that it will be easy and properties of Mapviewernet in IIS Note:I logged as a administrator shall i did any thing wrong?or is there any other properties i need to change? i worked on mgos 2.0 previously but no issues with that. i dont know why this happens in mgos 2.1 plz anyboby help me so that it would be a great help. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] RE: IIS Configuration of Mapguide OS - testing web server extensions fails
If you can find the exact line of code that causes the problem, that would help. If you have the exact problem that is listed in the post, have you tried setting permissions to "Everyone" -> "Full" on the file and folder? Regards, Kenneth Skovhede, GEOGRAF A/S On 22-01-2010 07:19, padmini godavarthi wrote: Hi Kenneth, Thanks for your reply . I followed the guidelines given in ul. the problem is solved. Now Actually my poblem is that while running on show in browser the exceptions comes that System.Security.Permissions.SecurityPermission I have seen the same error posted by somebody and replied by you http://n2.nabble.com/security-exception-webconfig-ini-td1813100.html#a1813100 i think that the problem might be with IIS (Application Pools).iam unaware of that.so iam unable to find the problem as well as solution. In my system -- IIS | Application Pool |___MapguideApplication Pool | | Default Web site | | SharePoint -80 | |---Mapadmin MapAgent MapviewerAjax is there so plz giv me guidence so that it would be helpful to me... Note:-Iam logged as a system Administrator ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Start the map with coordinates specified in the URL
What line of code throws the exception? Regards, Kenneth Skovhede, GEOGRAF A/S On 21-01-2010 17:29, Rubén Casal Prieto wrote: HHHello, I have this code, to start the map with coordinates with parameters passed in the URL. /String requestParams STRX = [ "X"]; String requestParams String = [ "Y"]; MgSiteConnection siteconection = new MgSiteConnection (); siteconection.Open (new MgUserInformation (sessionId)); MgResourceService resourceService = (MgResourceService) siteconection.CreateService (MgServiceType.ResourceService) as MgResourceService; MgResourceIdentifier wlresourceId = new MgResourceIdentifier (webLayout); MgByteReader wlreader = resourceService.GetResourceContent (wlresourceId); WlXML = wlreader.ToString String (); XmlDocument doc = new XmlDocument (); doc.LoadXml (wlXML); XmlNode doc.GetElementsByTagName NodeCenterx = ( "centerX"). Item (0); NodeCenterx.LastChild.Value = STRX; XmlNode doc.GetElementsByTagName NodeCenterY = ( "centerY"). Item (0); NodeCenterY.LastChild.Value = STRY; XmlNode doc.GetElementsByTagName NodeScale = ( "Scale"). Item (0); NodeScale.LastChild.Value = "2000"; StreamSave MemoryStream = new MemoryStream (); doc.Save (streamSave); byte [] byteArr = streamSave.ToArray (); MgByteSource Bytesource = new MgByteSource (byteArr, byteArr.Length); / / Create weblayout in the session to update the new version SessionmapName = wlresourceId.GetName String (); SessionWebLayout String = "Session" + sessionId + "/ /" + + sessionmapName. WebLayout "; MgResourceIdentifier sessionResourceId = new MgResourceIdentifier (sessionWebLayout); / / Write to the session resourceService.SetResource (sessionResourceId, Bytesource.GetReader (), null); webLayout = sessionWebLayout; src ="../ mapviewernet / ajaxviewer.aspx? SESSION = <% = sessionId%> & WEBLAYOUT = <% = webLayout%> " / But I returned the following error: The type 'OSGeo.MapGuide.MgUnclassifiedException' of assembly 'MapGuideDotNetApi, Version = 2.0.2.3011, Culture = neutral, PublicKeyToken = null' is not marked as serializable. Anybody know why it can be??? Thank you very much in advance and best regards! El NUEVO Internet Explorer 8 es el navegador más rápido y seguro ¡Descárgalo gratis! <http://www.vivelive.com/internetexplorer8/> ___ 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
Re: [mapguide-users] RE: IIS Configuration of Mapguide OS - testing web server extensions fails
You probably need to allow .Net 2.0: If it is registrered in IIS, you can go to "Extensions" and Enable it. Otherwise, this may help: http://broersa.wordpress.com/2008/07/17/enable-aspnet-20-in-webservice-extensions-iis6/ You also need to look in the eventlog to see if two applications are using the same apppool but with different .Net versions. Regards, Kenneth Skovhede, GEOGRAF A/S On 21-01-2010 11:21, padmini godavarthi wrote: Hi Kenneth, Thanks for you reply. Afterinstalling mapguide opensource 2.1 1) i found that MapguideApplicationPool was Created in the IIS. In side that pool therewere 3 folders created named as Mapadmin MapviewerAjax Mapagent But the mapadmin and Mapagents are working properly but i think the problem is with MapviewerAjax I previously installed Mapguide Opensource 2.0 on Windows XP but its working properly 2)Second thing is that regarding pemissions, i logged as a system Administrator butweb server extensions is not working. Note:i dont have VS2005 in my system.only .net framework is there.. How can i resolve this problem?? Regards, Padmini G. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] RE: IIS Configuration of Mapguide OS - testing web server extensions fails
404 errors either means that: you have not mapped the file correctly (eg. it does not exist), or that the extension is not registered (eg. no handler for .php files), or that the extension is not allowed to run (eg. the executable path is not listed as allowed in the extensions section) Unfortunately it is not possible to determine which of the three cases you are experiencing, without a complete listing of mappings, folders, permissions, etc.. Regards, Kenneth Skovhede, GEOGRAF A/S On 20-01-2010 11:31, padmini godavarthi wrote: Hi, iam using Windows 2003 Server and Mapgide Opensource 2.1.. I also have the save Problem Can u plz tell me the solution ? While running Web server Extensions i got an error that Page can not be found how to get my aspnet_isapi.dll Noe:-There is No Visual studio installed on my system.. Only .Net Frame work 2.0 is there in my system.. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Server stopped responding...?
Identity fetching means "read primary key". Unless you use MGOS 2.1 (or MGE 2010), be sure that each FeatureSource has only one table visible, otherwise MapGuide will enumerate all tables and columns visible for that FeatureSource, repeatedly. If you are using MGOS 2.1 (or MGE 2010) the results are cached, so only the initial hit should take time. The precaution stated above will still help performance for this initial hit. The reason that the timing is listed in the performance section, is that MapGuide creates a runtime map (binary copy of the map) on startup. This runtime map contains the primary key of all layers involved, and thus issues the GetIdentityProperties call, which takes a long time, as you have noticed. You should be able to observe that the map startup is taking more than 9 seconds. If you use MaestroAPI to create the runtime map, it will only fetch identities for layers that are selectable. IIRC MapGuide fetches identities regardless of selectability. Regards, Kenneth Skovhede, GEOGRAF A/S On 21-01-2010 02:44, Jamo wrote: I've since removed some SQL features Maybe this will help ? this Layer ahs some 300 features not many... however it seems to be taking sometime for ir ro even feth the identities? is this the SQL query time? SQL Feature cadFREE Time Profiling LayerDefinition: Session:a78183b8-e844-102c-8000-005056855030_en_7F010AF20AF10AF0//37e1ec81-60a0-4e38-8182-647862dff2d4.LayerDefinition Identity fetching:00:08.047 (Could be query time ?) Runtime layer creation:00:08.968 Scalerange [0 : 10001]:00:01.796 Scalerange [10001 : 1000]:00:01.187 Rendering scales:00:12.625 (Total Time taken to render cadFREE) Another example this is a shape file with few features seems to be a massive tiem difference though. SHP Feature EnvMBMPDA Profiling LayerDefinition: Session:a78183b8-e844-102c-8000-005056855030_en_7F010AF20AF10AF0//fe1f4327-ba13-44bb-9a56-e78495c2b12a.LayerDefinition Identity fetching:00:00.499 Runtime layer creation:00:00.967 Scalerange [0 : 1000]:00:00.982 Rendering scales:00:05.381 I'm trying to put together some examples of how slow our SQL DB is performing when compared to other sources. However before I bug our IT section with this I need to be sure it's not some setting I can change in mapguide. I've been using the SQL server to show these features for over 2 months and haven't had any issues. rough 3-4secs to generate image on screen. I can't think of any changes I've made to effect this. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Re: Start with a map coordinates passed by parameters in the URL
There is a .Net MaestroAPI example of the same here: http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/CustomizedZoomWithWebLayout Regards, Kenneth Skovhede, GEOGRAF A/S On 20-01-2010 11:59, Jackie Ng wrote: What you could do is on startup, to read the content of your WebLayout, modify it's initial view section to contain your coordinates, write the modified content to your session repository and point your AJAX viewer to load the session-based WebLayout. There's a PHP example here: http://trac.osgeo.org/mapguide/wiki/CodeSamples/PHP/InitialMapView Note that with this approach, every time you reset your view in the AJAX viewer, it will reset to your custom initial position and scale. - Jackie ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] MapGuide with ASP.Net
As I wrote in the original email: "the bin folder from the viewer and the webconfig.ini" The files from the bin folder goes into the "bin" folder of your project. You can place the webconfig.ini anywhere you like, but you need to reference it when you call the Initialize function on the MapGuideAPI. Regards, Kenneth Skovhede, GEOGRAF A/S On 18-01-2010 11:16, kandiyateesh wrote: Thanks Kenneth for your kind reply. Can you please tell me what files I need to copy if I'm to use VS2005 installed on different machine. Regards, Yateesh ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Application compatibility b/w MGE2009 and MGOS 2.0.2
You need to run it with corflags.exe and ildasm.exe in the path. The easiest way to do this is to use the "Visual Studio 200x Command Prompt" Regards, Kenneth Skovhede, GEOGRAF A/S On 15-01-2010 10:48, Dejan Gregor wrote: I have tried to run it, but I got following error : Execute of corflags.exe failed Execute of ildasm.exe /? failed An unexpected processing error did occur: System.NullReferenceException: Object reference not set to an instance of an object. at Signer.Executor.GetInvalidCommands() at Signer.Program.Execute() at Signer.Program.Main(String[] args) I will wait your information. Thanks! Dejan On Fri, Jan 15, 2010 at 10:13, Kenneth Skovhede, GEOGRAF A/S [via OSGeo.org] <[hidden email] <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4397794&i=0>> wrote: You only need an updated MapGuideDotNetApi if you are using the LocalNativeConnection. I will upload the updated signed dll files later today (appx 20:00 GMT) If you cannot wait, the command to sign MapGuideDotNetApi is: signer.exe -k maestroapi.key -outdir .\out -a MapGuideDotNetApi.dll Signer.exe and the key is in SVN: http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/Signer/Signer.exe?format=raw http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/maestroapi.key?format=raw The bindingRedirect setup is as follows: Regards, Kenneth Skovhede, GEOGRAF A/S On 15-01-2010 09:41, Dejan Gregor wrote: > Kenneth, > > I am using the verion 2.1.0.3505 for MapGuideDotNetApi. Where should I set > the version value (newVersion or oldVersion) and is the publicKeyToken still > 'f526c48929fda856'? > > I am using MGE 2010. > > Dejan > > > > Kenneth Skovhede, GEOGRAF A/S wrote: > >> The "Invalid Stream Header" is a sort-of catch-all exception that happens >> when the MapGuide service tries to de-serialize an object, and finds >> something it does not expect. >> The usual cause of this is the other (unmanaged) binaries. >> >> The MapGuideDotNet.dll file is a thin wrapper that just calls the >> unmanaged dll's. >> >> So you can bind .Net to either version of the managed dll, but you MUST >> have the correct >> unmanaged dll's in the bin folder. >> >> Alternatively, you can fix the binding through the Web.config file: >> >> >> >> >> > publicKeyToken="f526c48929fda856" /> >> > /> >> >> >> >> >> >> Replace the publicKeyToken and version as you please. >> >> There was a slight change with MgDisposable/MgGuardedDisposable some >> time ago. >> If you run into that, you have to use the re-bind option described above. >> >> Regards, Kenneth Skovhede, GEOGRAF A/S >> >> >> >> MacNair skrev: >> >>> We have a Mapguide application developed using MGE 2009’s library. This >>> application does most of its work by calling methods from another DLL >>> called >>> “MGEUtils.DLL”. This DLL references “MapGuideDotNet.DLL”. >>> >>> The application works fine on the development machine where MGE is >>> installed. But on the deployment machine where MapGuide Open Source (MGOS >>> 2.0.2.3011) is installed we are getting a few errors. >>> >>> Should we recompile the class library “MGEUtils” referencing MGOS’s >>> MapGuideDotNet.DLL? >>> >>> The calls made to the methods in MGEUtils to initialize the application >>> are >>> throwing a few errors as given under. Note: The function definitions for >>> these methods are given in Appendix below: >>> >>> // Initialize the webtier >>> string sErrMsg = ""; >>> mgeUtils.InitializeWebTier(configPath, sErrMsg); >>> >>> // Validate the user login and create a session >>> mgeUtils.InitialiseSession("Anonymous", "", ref sessionId, ref sErrMsg); >>> >>> Note: The function definitions for the above calls within MGEUtils are >>> given at the end of this document. >>> >>> Errors encounterd are… >>> >
Re: [mapguide-users] Searching for a sample C# application for searching multiple fields of a feature class
Ok. I have not used the samples so I cannot help you there. Regards, Kenneth Skovhede, GEOGRAF A/S On 15-01-2010 09:45, Dejan Gregor wrote: that I have used, but getting a lot of er ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Application compatibility b/w MGE2009 and MGOS 2.0.2
You only need an updated MapGuideDotNetApi if you are using the LocalNativeConnection. I will upload the updated signed dll files later today (appx 20:00 GMT) If you cannot wait, the command to sign MapGuideDotNetApi is: signer.exe -k maestroapi.key -outdir .\out -a MapGuideDotNetApi.dll Signer.exe and the key is in SVN: http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/Signer/Signer.exe?format=raw http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/MaestroAPI/maestroapi.key?format=raw The bindingRedirect setup is as follows: publicKeyToken="f526c48929fda856" /> Regards, Kenneth Skovhede, GEOGRAF A/S On 15-01-2010 09:41, Dejan Gregor wrote: Kenneth, I am using the verion 2.1.0.3505 for MapGuideDotNetApi. Where should I set the version value (newVersion or oldVersion) and is the publicKeyToken still 'f526c48929fda856'? I am using MGE 2010. Dejan Kenneth Skovhede, GEOGRAF A/S wrote: The "Invalid Stream Header" is a sort-of catch-all exception that happens when the MapGuide service tries to de-serialize an object, and finds something it does not expect. The usual cause of this is the other (unmanaged) binaries. The MapGuideDotNet.dll file is a thin wrapper that just calls the unmanaged dll's. So you can bind .Net to either version of the managed dll, but you MUST have the correct unmanaged dll's in the bin folder. Alternatively, you can fix the binding through the Web.config file: Replace the publicKeyToken and version as you please. There was a slight change with MgDisposable/MgGuardedDisposable some time ago. If you run into that, you have to use the re-bind option described above. Regards, Kenneth Skovhede, GEOGRAF A/S MacNair skrev: We have a Mapguide application developed using MGE 2009’s library. This application does most of its work by calling methods from another DLL called “MGEUtils.DLL”. This DLL references “MapGuideDotNet.DLL”. The application works fine on the development machine where MGE is installed. But on the deployment machine where MapGuide Open Source (MGOS 2.0.2.3011) is installed we are getting a few errors. Should we recompile the class library “MGEUtils” referencing MGOS’s MapGuideDotNet.DLL? The calls made to the methods in MGEUtils to initialize the application are throwing a few errors as given under. Note: The function definitions for these methods are given in Appendix below: // Initialize the webtier string sErrMsg = ""; mgeUtils.InitializeWebTier(configPath, sErrMsg); // Validate the user login and create a session mgeUtils.InitialiseSession("Anonymous", "", ref sessionId, ref sErrMsg); Note: The function definitions for the above calls within MGEUtils are given at the end of this document. Errors encounterd are… CASE I: Placing MGE’s MapGuideDotNet.dll along with “MGEUtils.DLL” in the application’s bin directory. Error @ LINE: mgeUtils.InitialiseSession("Anonymous", "", ref sessionId, ref sErrMsg); Error details: OSGeo.MapGuide.MgInvalidStreamHeaderException: Invalid stream header exception CASE II: Placing MGOS ’s MapGuideDotNet.dll along with “MGEUtils.DLL” in the application’s bin directory. Error @ LINE: mgeUtils.InitializeWebTier(configPath, sErrMsg); Error details: Could not load file or assembly 'MapGuideDotNetApi, Version=2.0.0.3202, Culture=neutral, PublicKeyToken=6416a18f8953383b' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Any help on this? Sorry for the lengthy mail. Thanks! Function defintions public bool InitializeWebTier(string configPath, string csErrMsg) { try { // Check if the webConfig file exists if (!File.Exists(configPath)) { return false; } MapGuideApi.MgInitializeWebTier(configPath); return true; } catch (MgConnectionFailedException mge) { csErrMsg = mge.GetMessage(); return false; } } public bool InitialiseSession(string userName, string userPwd, ref string sessionId, ref string csErrMsg) { try { // Validate user login MgUserInformation userInfo = new MgUserInformation(userName, userPwd); MgSite site = new MgSite(); site.Open(userInfo); // Create a session sessionId = site.CreateSession(); } catch (MgConnectionFailedException mge) { csErrMsg = mge.GetMessage(); return false; } return true; } ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users - Dejan Gregor, MSc GISc Researcher and Consultant http://www.linkedin.com/in/dgregor ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Searching for a sample C# application for searching multiple fields of a feature class
I don't have a comple sample that fits your description, but some bits and pieces (chunks if you prefer). I personally use MaestroAPI (for obvious reasons): http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI Using the MaestroAPI samples as a base, I have put together this quick untested sample of the server code: http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/QueryFeatureSource Another way to do it is show here: http://trac.osgeo.org/mapguide/browser/trunk/Tools/Maestro/Maestro/FormExpression.cs#L732 The interesting line is 751: using (FeatureSetReader rd = m_connection.QueryFeatureSource(m_featureSource, m_schema.FullnameDecoded, filter, new string[] { ColumnName.Text })) while (rd.Read()) { } //Read data here If you do not want to use MaestroAPI, you can look at the MaestroAPI source code to figure out how to use the MgFeatureService object to query features. Regards, Kenneth Skovhede, GEOGRAF A/S On 13-01-2010 10:46, Dejan Gregor wrote: Hi, I am new to development in MapGuide and C# programming. I would like to implement a sample C# application for searching multiple fields of a vector FDO feature class (e.g. parcel numbers and other description). I am using MGOS 2.1. I would need a complete sample code (not just chunks) that I could directly implement, but maybe searching on the wrong place. I have a simple AJAX Viewer, not Fusion. Does anyone know a place to search or submit a stable search engine sample? Thanks! Dejan - Dejan Gregor, MSc GISc Researcher and Consultant http://www.linkedin.com/in/dgregor ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] MapGuide with ASP.Net
There is no need to also install PHP. MapGuide has PHP installed anyway, you do not need the PHP viewer. It makes things easier if you install MGOS and VS on the same machine, but it is not required. If you use seperate machines, you have to copy over a few files from MGOS (the bin folder from the viewer and the webconfig.ini). You also need to ensure that the appropriate ports are open between the two machines (ports are listed in webconfig.ini). Regards, Kenneth Skovhede, GEOGRAF A/S On 13-01-2010 10:08, kandiyateesh wrote: installed on a different machine (from the machine where MapGuide Open Source and Maestro have been install ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Tracking location in MapGuide OS on a Notebook with GPS receiver
There is an example of the geolocation API for firefox here: http://hacks.mozilla.org/2009/06/geolocation/ Unfortunately (for Thomas) this does not read GPS data yet: There are a few common ways to get location information. The most common are local WiFi networks, IP address information, and attached GPS devices. In Firefox 3.5 we use local WiFi networks and IP address information to try and guess your location. Regards, Kenneth Skovhede, GEOGRAF A/S On 14-01-2010 09:32, Zac Spitzer wrote: should be pretty easy with a modern real browser, firefox has native support for reading your location.. just need to do some simple javascript 2010/1/14 Thomas Grosser: Happy New Year to everybody of this mailing list ! We want to show the actual (live) position in MapGuide OS while using a Laptop with an integrated GPS Receiver. Has anyone ideas how this can be realized ? Thanks a lot ! Thomas ___ 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
Re: [mapguide-users] Tracking location in MapGuide OS on a Notebook with GPS receiver
The tricky part is getting the GPS coordinates into the browser. As the javascript is running with limited access, it cannot directly read the GPS data. You need some sort of browser plugin (or frequent clipboard copy tricks) to achieve this. Once you have the coordinates, you can use MapGuide's coordinate system library to project the coordinates from lat/lon into your map's coordinate system (server side). Then it is a matter of calling ZoomTo(x, y, scale) in javascript. Regards, Kenneth Skovhede, GEOGRAF A/S On 14-01-2010 09:30, Thomas Grosser wrote: Happy New Year to everybody of this mailing list ! We want to show the actual (live) position in MapGuide OS while using a Laptop with an integrated GPS Receiver. Has anyone ideas how this can be realized ? Thanks a lot ! Thomas ___ 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
Re: [mapguide-users] Copying resources from MapGuide Enterprise to MapGuide OS
Before opening a resource, Maestro copies into a temp resource. That explains the weird path displayed in the error message. If you restart MapGuide while being connected with Maestro, you get a new session, and thus the resources are missing. I have no idea why it would happen more than once though. As expected, your LayerDefinition is in version 1.3.0, which explains the previously posted error. Happy to hear that it works! Regards, Kenneth Skovhede, GEOGRAF A/S On 13-01-2010 14:54, sc80 wrote: Thanks Kenneth. I installed Maestro 2.0 beta 1 but I kept on getting this error: http://n2.nabble.com/file/n4348669/error.jpg So I performed the GetResourceContent and found upon returning to Maestro I tried to open the layer again and it worked! I immediately tried to open other layers (without performing a GetResourceContent) and they too worked. Indeed everything's working now, so i'm happy even if i'm confused as to what the issue would have been. I've included the xml from the GetResourceContent in case that sheds any light on it for you. Thanks again for your help. Regards Sam -http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xsi:noNamespaceSchemaLocation="LayerDefinition-1.3.0.xsd" version="1.3.0"> - Library://Brighton/DataConnection/IF_Infrastructure/IF_D_OnshoreInfrastructure.FeatureSource Default:IF_L_Rail FeatureClass - FeatId FeatId - NATION NATION - LENGTH LENGTH - NAME NAME - CNTRYNAME CNTRYNAME - TONNAGE TONNAGE Geometry - - - - Rail 0.0 ff00 Centimeters DeviceUnits Kenneth Skovhede, GEOGRAF A/S wrote: The data files in the "Repositories/Library" folder is a dbxml database, and not intended for reading or writing by anything but MapGuide (eg. don't modify it with a text editor). The document it refers to the layer, which is an xml document (stored in the dbxml). The numbers are indeed (linenumber, columnnumber), but in the LayerDefinition xml document. I think the problem is caused by using an older version of Maestro which does not recognize LayerDefinition version 1.3.0 (which Studio creates). If you use Maestro 2.0 beta 1, it should open the resource just fine. If not, you can get the actual resource xml by visiting the html test form: http://localhost/mapguide/mapagent/index.html Use the GetResourceContent operation to get the xml, and respond with a mail linking to the xml, and I will see if I can find obvious errors. Regards, Kenneth Skovhede, GEOGRAF A/S On 13-01-2010 11:48, sc80 wrote: Hi all, We have been using the trial version of MapGuide Enterprise 2010 however we are now looking to use MapGuide OS v2.1 and would like to utilise the resources we created with Enterprise. From reading about resources I thought it would just be a case of copying the contents of the library folder (Repositories\Library) for Enterprise to the equivalent location in the OS version. When i did this however (having re-created the appropriate aliases for the data connections) although the data connections work and i am able to preview the features in Maestro (v1.0.9.15910) the layer resources seem to have been corrupted as when i try to open them in Maestro I get an error: Unable to open the resource Library://FolderName/Layers/SubFolder/layername.LayerDefinition Error Message: There is an error in xml document (2,117) I've looked into the MgLibraryResourceContents.dbxml but I can't see anything obviously wrong (although i am very new to mapguide and have little development knowledge). Would this even be the xml document to which it's referring? and is the (2,117) referring to a row and character position in this document? Has anyone got any suggestions as to what is causing this or how I might be able to try to resolve this? I've googled the error, but it was to no avail and the MapGuide Studio 2010 Getting started guide is of little help. Any help gratefully received. Thanks in advance. Sam ___ 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
Re: [mapguide-users] Copying resources from MapGuide Enterprise to MapGuide OS
The data files in the "Repositories/Library" folder is a dbxml database, and not intended for reading or writing by anything but MapGuide (eg. don't modify it with a text editor). The document it refers to the layer, which is an xml document (stored in the dbxml). The numbers are indeed (linenumber, columnnumber), but in the LayerDefinition xml document. I think the problem is caused by using an older version of Maestro which does not recognize LayerDefinition version 1.3.0 (which Studio creates). If you use Maestro 2.0 beta 1, it should open the resource just fine. If not, you can get the actual resource xml by visiting the html test form: http://localhost/mapguide/mapagent/index.html Use the GetResourceContent operation to get the xml, and respond with a mail linking to the xml, and I will see if I can find obvious errors. Regards, Kenneth Skovhede, GEOGRAF A/S On 13-01-2010 11:48, sc80 wrote: Hi all, We have been using the trial version of MapGuide Enterprise 2010 however we are now looking to use MapGuide OS v2.1 and would like to utilise the resources we created with Enterprise. From reading about resources I thought it would just be a case of copying the contents of the library folder (Repositories\Library) for Enterprise to the equivalent location in the OS version. When i did this however (having re-created the appropriate aliases for the data connections) although the data connections work and i am able to preview the features in Maestro (v1.0.9.15910) the layer resources seem to have been corrupted as when i try to open them in Maestro I get an error: Unable to open the resource Library://FolderName/Layers/SubFolder/layername.LayerDefinition Error Message: There is an error in xml document (2,117) I've looked into the MgLibraryResourceContents.dbxml but I can't see anything obviously wrong (although i am very new to mapguide and have little development knowledge). Would this even be the xml document to which it's referring? and is the (2,117) referring to a row and character position in this document? Has anyone got any suggestions as to what is causing this or how I might be able to try to resolve this? I've googled the error, but it was to no avail and the MapGuide Studio 2010 Getting started guide is of little help. Any help gratefully received. Thanks in advance. Sam ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] setup wms using maestro
Also, to ensure that the WMS is exposed properly from MapGuide, try this: http://localhost/mapguide/mapagent/mapagent.fcgi?SERVICE=WMS&VERSION=1.1.1&REQUEST=GETCAPABILITIES Regards, Kenneth Skovhede, GEOGRAF A/S On 11-01-2010 11:20, Zac Spitzer wrote: with openlayers you need to set the extents to see a map displayed 2010/1/11 Andre Schoonbee: I am trying to define a layer as wms using Maestro beta 2.0. (MGOS 2.1). The layer is towns in Namibia and I can see the towns fine when I preview the data of publish the layer on a map. The steps I followed: Go to properties of the towns layer; WMS and click on bottom button to automatic get Bounds from data (the data is in shp format). Then I added ESPG:4326.Added Towns as name and most of the other fields such as meta data and abstract. The permissions I left as is. But this still now showing on my WMS open layer map. The syntax in my wms.htm file is as follows: map.addLayer(layer2); layer2=new OpenLayers.Layer.WMS("MapGuide Towns", "http://173.45.90.198:8008/mapguide/mapagent/mapagent.fcgi?SERVICE=WMS&versi on=1.1.1&username=Administrator&password=admin", {layers:"Ruwis/Layers/Towns", transparent:"true",srs:"EPSG:4326", format:"image/png"},{opacity:"0.8"}); map.addLayer(layer2); Pleased help! Regards Andre 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
Re: [mapguide-users] URL Activated for Feature - New Window and Task Pane?
The answers is no, you can't. You cannot supply a target on each layer, so there is no way to determine which layers should open in another window. I have used a workaround, that consist of always opening in a hidden frame. I then use links of the form: javascript:window.open("url"); or javascript:parent.frames['framename'].location.href = "url" The upside to this method, is that you can activate any javascript function with a link. The downside is that most browsers use popup blockers, making the call to window.open fail. (But I think the viewer has this problem already?) If you use this method, make sure that the hidden frame gets loaded with an empty page from the server, otherwise you get all sorts of crossdomain problems. Another (more messy) way would be to modify the viewer link activation function, and have that one determine the action, based on a hardcoded list of layers. Regards, Kenneth Skovhede, GEOGRAF A/S On 08-01-2010 16:07, Nickthetemp wrote: I should Mention that I am using Mapguide Enterprise 2010 and Mapguide Studio 2010. Thanks ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] "Failed to read schema..." error with GDAL
Hi, This might have been fixed in the newest version Maestro. It was a problem with correctly parsing the schema xml. Regards, Kenneth Skovhede, GEOGRAF A/S On 16-12-2009 09:41, Hardt wrote: Hi Kenneth, I recreated the datasource and the layer, to be sure to have an error message before doing what you said. The error message popped out as always, but the "View last exception" option says there is no exception to view. http://n2.nabble.com/file/n4174355/Capture.png Kenneth Skovhede, GEOGRAF A/S wrote: Hi Hardt, In the "About..." menu, can you select the "view last exception", and send the message to this list? Regards, Kenneth Skovhede, GEOGRAF A/S On 14-12-2009 15:55, Hardt wrote: Hi, I created a raster datasource with GDAL. When I create a layer using this datasource, after I selected the Feature Resource, I get an error message saying "Failed read schema from data source. The operation gave the error message: Value cannot be null. Parameter name: input" http://n2.nabble.com/file/n4164488/Capture.png After that, I can select a schema (always default:default), and in the Raster field, sometimes I get "image", sometimes I get "raster" (it seems to depend on which editor I used when I created the datasource) I found no error in MG logs, and the DescribeSchema tool gives me this: -http://www.w3.org/2001/XMLSchema"; targetNamespace="http://fdo.osgeo.org/schemas/feature/default"; xmlns:fdo="http://fdo.osgeo.org/schemas"; xmlns:gml="http://www.opengis.net/gml"; xmlns:default="http://fdo.osgeo.org/schemas/feature/default"; elementFormDefault="qualified" attributeFormDefault="unqualified"> - - - - - - - - - I can use the layer in a map, but as I explained in another thread today, there are other problems with coordinate systems etc... What means the "schema" error, and how can I fix it? Thanks, Hardt ___ 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
Re: [mapguide-users] Look for lines
You may also want to try out the advanced symbolization capabilities: http://trac.osgeo.org/mapguide/wiki/AdvancedStylization You can see an example for lines here: http://trac.osgeo.org/mapguide/wiki/MapGuideRfc14 http://trac.osgeo.org/mapguide/attachment/wiki/MapGuideRfc14/LineUsage.doc Regards, Kenneth Skovhede, GEOGRAF A/S On 15-12-2009 13:29, Ivan Miličević wrote: You can set the composite line Mapguide Studio or Maestro. *From:* mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] *On Behalf Of *manav dayal *Sent:* Tuesday, December 15, 2009 12:13 PM *To:* MapGuide Users Mail List *Subject:* [mapguide-users] Look for lines Is there an option to display double line for a line (as in google maps) using mapguide maestro. I am attaching a jpg for comparison. Thanks and Regards. The INTERNET now has a personality. YOURS! See your Yahoo! Homepage <http://in.rd.yahoo.com/tagline_yyi_1/*http:/in.yahoo.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
Re: [mapguide-users] "Failed to read schema..." error with GDAL
Hi Hardt, In the "About..." menu, can you select the "view last exception", and send the message to this list? Regards, Kenneth Skovhede, GEOGRAF A/S On 14-12-2009 15:55, Hardt wrote: Hi, I created a raster datasource with GDAL. When I create a layer using this datasource, after I selected the Feature Resource, I get an error message saying "Failed read schema from data source. The operation gave the error message: Value cannot be null. Parameter name: input" http://n2.nabble.com/file/n4164488/Capture.png After that, I can select a schema (always default:default), and in the Raster field, sometimes I get "image", sometimes I get "raster" (it seems to depend on which editor I used when I created the datasource) I found no error in MG logs, and the DescribeSchema tool gives me this: -http://www.w3.org/2001/XMLSchema"; targetNamespace="http://fdo.osgeo.org/schemas/feature/default"; xmlns:fdo="http://fdo.osgeo.org/schemas"; xmlns:gml="http://www.opengis.net/gml"; xmlns:default="http://fdo.osgeo.org/schemas/feature/default"; elementFormDefault="qualified" attributeFormDefault="unqualified"> - - - - - - - - - I can use the layer in a map, but as I explained in another thread today, there are other problems with coordinate systems etc... What means the "schema" error, and how can I fix it? Thanks, Hardt ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] changing position of task bar
The approach mentioned by Chris will leave you with the legend and taskpane side by side, rather than on top. While it is possible to modify the viewer, there are two things going against it: 1) It was not made for modification, which will make it hard to fit in customizations 2) Any change has to be re-implemented when your client upgrades to the next version of MG Number 1) implies that you will spend a lot of time, and number 2) implies that you will do it multiple times. For these reasons, Fusion was built. While I can see issues with Fusion, it is meant to be customized, and I would recommend that you either "roll your own" viewer or use Fusion, if the basic viewer is not enough. Regards, Kenneth Skovhede, GEOGRAF A/S On 14-12-2009 18:48, Chris Claydon wrote: Without trying it, I'm not sure if this would work but it might be worth a try... 1) In MG Studio or equivalent, open your basic layout and disable the properties pane and task pane. 2) Set URL hyperlinks to open in a specified frame, and pick a new unique name for the frame. 3) Set all commands that are currently targeted at the task pane also to open in that specified frame. 4) Modify the AJAX viewer to add a new frame with the unique name below the legend. It shouldn't take a huge amount of effort to figure out if it's actually going to work. Chris. -Original Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Jo Cook Sent: Monday, December 14, 2009 7:54 AM To: mapguide-users@lists.osgeo.org Subject: [mapguide-users] changing position of task bar Dear all, I would like to change the position of the task bar in the ajax viewer for MGOS 2.1. I have seen the posts about changing it to the left-hand side, and have implemented that, but ideally I want to ditch the properties pane and integrate the task pane (with a custom properties task included) below the legend. When I look in the developer's guide at the layout of the frames within the ajax viewer, it doesn't look like this is going to be possible, as both the legend and the properties panes are integrated within the main mapframe. Is there a way to do what I want, by changing the order of frames within the various templates, or am I wasting my time? For a number of regions, the client wants the ajax viewer rather than fusion. Thanks Jo ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] MGOS 2.1: Failure with dynamic coordination transformation
Unfortunately, yes it does. However, if your data is value comparable, eg. the point (1,1) is the same place in both datasets, you can just override the data with the real CS into XY-M. Regards, Kenneth Skovhede, GEOGRAF A/S isca skrev: It is actually the other way around. I want to transform the real CS into XY-M. Does the same count for this situation ? Jason Birch wrote: Transforming between XY-M and a real CS is not technically possible; the previous version must have been "guessing" that the XY-M dataset was in the same projection as the other datasets. My bet is the change from PROJ.4 to Mentor as the underlying CS library makes this a bit stricter, requiring you to manually specify the CS for the arbitrary data before attempting to transform it (or not). Jason 2009/12/10 isca Hello, I have upgraded my MGOS 2.0.1 towards 2.1 and encountered following problem: - I have a map which has the X-YM coordinate system - adding layers which refer to a featuresource with X-YM coordinate system works fine - adding layers with coordinate system Belgian Lambert 72 causes following error message: Error: Failed to stylize layer: RPA The coordinate system initialization failed. Could not initialize the geodetic transformation. When overriding the coordinate system it works fine, but in previous versions transformation took place automatically. Is this a change in behavour or a problem with the transformation between the coordinate systems ? Thanks in advance. -- View this message in context: http://n2.nabble.com/MGOS-2-1-Failure-with-dynamic-coordination-transformation-tp4145048p4145048.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 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
Re: [mapguide-users] MGOS 2.1 - ECW
Hi Trevor. The message reported by Maestro is a warning, because it can see that the extents are invalid. I think 2.0.2 returned the correct bounds, so perhaps a change after that resulted in this problem. IIRC, the coordinate system was also returned correctly in 2.0.2. In 2.0.2 (and 2.1), the XY-M and default extents was returned by the provider if you gave it an empty folder. I would think it should throw an error because no files were loaded. The config document is optional (afaik) but is created if you use a composite set of ECW files. Regards, Kenneth Skovhede, GEOGRAF A/S Trevor Wekel skrev: Oops... The original message was regarding ECW imagery. So I performed the same sequence of steps with a directory of ECW images and got the same result. As a side note, it looks as though full color orthophoto ECW imagery seems to be about 2x faster than the same imagery in MrSID format when displayed under GDAL. Many months ago, I also noticed the same ECW/MrSID behaviour when using the Autodesk Raster Provider. Regards, Trevor *From:* Trevor Wekel *Sent:* December 10, 2009 4:31 PM *To:* 'MapGuide Users Mail List' *Subject:* RE: [mapguide-users] MGOS 2.1 - ECW Hi Kenneth, I've been doing some testing of MrSID data with the MGOS 2.1 release and Maestro 1.1.0.4358. My MrSID images have embedded correlation information. When I try to save the feature source, Maestro throws the following error message "Spatial context extent appears to be invalid (or default)." I save the resource despite the error. Using the HTML test pages, the resource is correctly generated with the coordinate system override. http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd"> OSGeo.Gdal DefaultRasterFileLocation %MG_DATA_PATH_ALIAS[casil]%7.5m/sid/ Default PROJCS["UTM83-10",GEOGCS["LL83",DATUM["NAD83",SPHEROID["GRS1980",6378137.000,298.25722210]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",50.000],PARAMETER["false_northing",0.000],PARAMETER["central_meridian",-123.00],PARAMETER["scale_factor",0.9996],PARAMETER["latitude_of_origin",0.000],UNIT["Meter",1.00]] However, I notice there is no config document associated with the resource. Does the GDAL provider use a configuration document? If so, should Maestro be generating one? Also, it looks as though the spatial contexts are not being returned correctly for my MrSID images. The bounds on the GetSpatialContexts HTTP op are the bogus/default ones. This is probably a defect we need to investigate. The imagery does appear if the bounds of the map extents are set correctly but this could be a non-obvious problem to overcome for new users. *-* <http://localhost:8008/mapguide/mapagent/mapagent.fcgi?OPERATION=GETSPATIALCONTEXTS&VERSION=1.0.0&LOCALE=en&CLIENTAGENT=MapGuide+Developer&RESOURCEID=Library%3A%2F%2FRaster%2Fcasil%2F7.5m_sid.FeatureSource&ACTIVEONLY=0&FORMAT=text%2Fxml> < *-* <http://localhost:8008/mapguide/mapagent/mapagent.fcgi?OPERATION=GETSPATIALCONTEXTS&VERSION=1.0.0&LOCALE=en&CLIENTAGENT=MapGuide+Developer&RESOURCEID=Library%3A%2F%2FRaster%2Fcasil%2F7.5m_sid.FeatureSource&ACTIVEONLY=0&FORMAT=text%2Fxml> < * * <*-1000* * * <*-1000* * * *-* <http://localhost:8008/mapguide/mapagent/mapagent.fcgi?OPERATION=GETSPATIALCONTEXTS&VERSION=1.0.0&LOCALE=en&CLIENTAGENT=MapGuide+Developer&RESOURCEID=Library%3A%2F%2FRaster%2Fcasil%2F7.5m_sid.FeatureSource&ACTIVEONLY=0&FORMAT=text%2Fxml> < * * <*1000* * * <*1000* * * * * Thanks, Trevor *From:* mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] *On Behalf Of *Kenneth Skovhede, GEOGRAF A/S *Sent:* December 10, 2009 12:47 AM *To:* MapGuide Users Mail List *Subject:* Re: [mapguide-users] MGOS 2.1 - ECW The GDAL provider is a little special, in that it never reports errors. Instead it returns the default extent, as you have in your xml below. Sometimes (perhaps an MG bug or a specific format issue?), the default extents are also returned for perfectly valid data, making it impossible to detect errors :(. The only way to see the data, is to set up a map with the correct coordinate system and extents. Then add the layer and preview the map. The GDALOPEN message you get means that the file was read correctly. I'm not sure what aux or HFA has to do with ECW though. IIRC (90% certain :)), it reports "succeeds as ECW" in
Re: [mapguide-users] MGOS 2.1 - ECW
The GDAL provider is a little special, in that it never reports errors. Instead it returns the default extent, as you have in your xml below. Sometimes (perhaps an MG bug or a specific format issue?), the default extents are also returned for perfectly valid data, making it impossible to detect errors :(. The only way to see the data, is to set up a map with the correct coordinate system and extents. Then add the layer and preview the map. The GDALOPEN message you get means that the file was read correctly. I'm not sure what aux or HFA has to do with ECW though. IIRC (90% certain :)), it reports "succeeds as ECW" in my setup. The "Value cannot be null" could be the indicator, but since you can get the schema, I suspect that it is working anyway. In Maestro (the latest preview), there is a bug with the coordinate system override, you need to use the "advanced" editor, or the coordsys override is not set (there is an issue registered). Regards, Kenneth Skovhede, GEOGRAF A/S Denis Lalonde skrev: I currently have several XP based laptops running MGOS 2.02 (IIS, PHP) and one server (MGOS 1.2, IIS, PHP). All of the maps on each were authored using Studio and each have a 1.05Gb ECW displaying correctly. However, I can not seem to get the same ECW to run correctly with MGOS 2.1 on another new XP laptop (IIS, PHP). I've tried using both Studio 2009 as well as Maestro to no avail. With studio, I use the GDAL provider and connect to an external data source via a pre-configured alias (C:\Data\ECW_2007). I then select the ECW via the "data files" and then do a coordinate override. When I add the layer using this data source and preview it, nothing appears. No errors show up in the log show up and running in debug mode shows no errors. I only get messages of type: "GDAL: GDALOPEN succeeds as HFA" (I think that means no errors...correct?). I've never used Maestro before, but I think I do everything right there too. I select the GDAL Provider, of "type Single file or folder", point to my .ecw in the Aliased folder and override the Coordinate System to UTM83-18. When I create a layer for this datasource however, I get this message: /"Failed to read schema from data source./ /The operation gave the error message: Value cannot be null./ /Parameter name: input"/ After that message shows up, I select "default: default" in the Schema drop down and "Image" automatically appears in the Raster drop down. If I check the XML of the datasource, the extents shown don't make any sense. This is apparent when I preview a map with the ECW because the map is centered at 0X, 0Y. Why is that? (See XML below) I've tried repeating everything several times, without success. I really need this to work. What has changed that this doesn't work anymore? If anyone wants to test drive the ECW, I can make it available for download. Let me know. // /xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xsi:noNamespaceSchemaLocation="FdoSpatialContextList-1.0.0.xsd">/ / OSGeo.Gdal.3.4/ / / /Default/ /System generated default FDO Spatial Context/ /Default/ / LOCAL_CS["*XY-MT*",LOCAL_DATUM["*X-Y*",1],UNIT["Meter", 1],AXIS["X",EAST],AXIS["Y",NORTH]]/ /Static/ // / / /-1000/ /-1000/ / / / / ///1000/ /1000/ / / // /0.001/ /0.001/ / / // ___ 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
Re: [mapguide-users] Upgrading from 2.0 to 2.1
The datafiles etc. will not have to change, only the repository (which is an xml database). You can either use the upgrade tools (which will also migrate your users), or make a package and load it into the new server. If you have customized WMS or WFS config files (or the ajaxviewer files), you have to re-make those changes. Regards, Kenneth Skovhede, GEOGRAF A/S Hardt skrev: Hi all, I've read here and there that we only need to upgrade the repository to upgrade to 2.1. Is that correct, or are there other files and folders to backup before upgrading (like data files somewhere, I don't know) Thanks for bringin me the light, Hardt ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Should I give up?
I have commented on the issue created (or attempted to, since trac is not responding): The many messages are reported in issue #1149. The dialog is actually a message like: Errors detected, save anyway? So, you can just press enter, and it should save just fine. The error message is a defect in MapGuide (issue #1061), which should have been fixed in 2.1 release. The reason you are not seeing the the messagebox in the older version of Maestro is because the resource validator was not implemented then. I recommend sticking to the preview, as it has multiple bugfixes, and you can get around your current issue by pressing . For your next issue, the featuresource is a WMS type, which means that the output is a raster type. For some reason the layer editor displays the vector layer editor. Since there is no vector data, you cannot select a geometry column. I have no idea why the WMS featuresource would be interpreted as a vector featuresource, but if the featuresource you are using is the nasa one, I can test it and hopefully fix it in a few days. Regards, Kenneth Skovhede, GEOGRAF A/S Jason Birch skrev: Can you please file that as a bug against the Maestro component in the MapGuide Trac so that it can be easily addressed by Kenneth? Please include details such as the WMS site you were connecting to and the error message received. I still heartily recommend using the current Maestro test build for those who aren't affected by this bug. The theming and expression editor enhancements alone make it more than worthwhile as long as there are no showstoppers for your use case.t On 2009-12-08, Neil_w wrote: Installing the current version of Maestro solves the WMS connection problem. What an aggravation that was! I'm still not able to view a feature from the service though. None of the feature classes have any Geometry. Please note the screen capture again. Are you getting anything? http://screencast.com/t/OTcyMDA0Y -- View this message in context: http://n2.nabble.com/Should-I-give-up-tp4128103p4133885.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 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
Re: [mapguide-users] Internet Guest Account Question
To clarify, MapGuide does not use the IUSR account, in fact it uses the "Local System" account. If you see something with IUSR_, it is because IIS uses this account pr. default for websites. (And MapGuide's WebAgent runs from IIS) You can either use integrated authentication with impersonation, or change the default user in the IIS settings for the website. Beware that you will run into multiple permission issues if you do this. Regards, Kenneth Skovhede, GEOGRAF A/S Emily LaMunyon skrev: Thanks for the replies. Our IS department has expressed concern over the IUSR account being used for Mapguide, due to the possibility of hacks. Maybe we are wrong. Is there a problem with just leaving the IUSR alone? Has anyone run into this before? -Original Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Dave Wilson Sent: Tuesday, December 08, 2009 12:19 PM To: MapGuide Users Mail List Subject: RE: [mapguide-users] Internet Guest Account Question I believe the issue is a permissions problem after that. The IUSR has probably been granted execute permissions on some of the MGE folders in order to run the mapagent and access the viewer files. You probably need to modify directory permissions to allow whomever your new user is. Dave -Original Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Jason Birch Sent: Tuesday, December 08, 2009 12:10 PM To: MapGuide Users Mail List Subject: Re: [mapguide-users] Internet Guest Account Question Not sure about setting the guest account. This may be related: I think that trying to set anything but anonymous access for MapGuide messes with its internal auth capabilities (which use standard http auth req/rest codes). I haven't tried this in quite a while though. On 2009-12-08, Emily LaMunyon wrote: Hello, I am interested in changing the Internet Guest Account that Mapguide uses to a private one. How do I get Mapguide to use this instead of the IUSR account? Is this possible? Thanks! -- View this message in context: http://n2.nabble.com/Internet-Guest-Account-Question-tp4134152p4134152.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 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 mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Unhandled exception error. Maestro. Remote server returned an error (559)..Help.
There was a bug in a previous version of Maestro, where moving a folder into itself twice would cause a corrupted respository. Fortunately the problem only manifests itself if you call EnumerateResources with a depth of -1, and Maestro has been updated to not do that. Try the newest preview version of Maestro and see if the problem goes away, if so, your repo may still be damaged inside, but at least you can work with it. Regards, Kenneth Skovhede, GEOGRAF A/S Trevor Wekel skrev: Hi Peter, You may be able to access the MapGuide repository using the HTTP test pages http://(machinename)/mapguide/mapagent/index.html <http://%28machinename%29/mapguide/mapagent/index.html>. Try using Resource... EnumerateResources... with various resource IDs. If this works, then you may be able to execute a MoveResource to move the resources around. Regards, Trevor *From:* mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] *On Behalf Of *badgerseatfrogs *Sent:* December 8, 2009 1:53 AM *To:* mapguide-users@lists.osgeo.org *Subject:* [mapguide-users] Unhandled exception error. Maestro. Remote server returned an error (559)..Help. Help! I accidentally moved a data source or layer or folder or something in Maestro and now Maestro crashes upon loading map (see error msg image). Can I recover what I've done? How can I debug? Can I access the XML's for the layers and maps (without Maestro)? New to Mapguide so have only modified Sheb. example and haven't de-bugged any applications as yet. P p...@afap (The Australian Foundation for the Peoples of Asia and the Pacific). View this message in context: Unhandled exception error. Maestro. Remote server returned an error (559)..Help. <http://n2.nabble.com/Unhandled-exception-error-Maestro-Remote-server-returned-an-error-559-Help-tp4131265p4131265.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@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
Re: [mapguide-users] Connection Problem
There should be a redirect in your apache setup that redirects: /mapguide/mapviewerajax/ to /mapguide/mapviewerjava/ajaxviewer.jsp For some reason the redirect appears to throw in "localhost". If it is non-obvious from looking at your apache config where this is, you may have some url-rewriting module or other item installed. Try locating any "localhost" items in the apache config. Alternatively, see if this is the method used: http://webdesign.about.com/od/htaccess/ht/ht302redirect.htm Regards, Kenneth Skovhede, GEOGRAF A/S manav dayal skrev: Jason Sir, I tried to access the page using Firefox with firebug It is showing an error in the script tag which says: Failed to load source for sourceFile top-level about:neterror?e=connectionFailure&u=http%3A//localhost%3A8008/mapguide/mapviewerjava/ajaxviewer.jsp%3FSESSION%3D0b920dc6--1000-8000-0018f319f820_en_7F010AFC0AFB0AFA%26WEBLAYOUT%3DLibrary%3A//Samples/ms/Layouts/ms.WebLayout&c=UTF-8&d=Firefox%20can%27t%20establish%20a%20connection%20to%20the%20server%20at%20localhost%3A8008. script.tags( X| 220 221 222 223 224 225 226 227 ) Is this call hardwired to refer localhost? Can I modify it in the file /mapguide/mapviewerajax ? Thanks and Regards --- On *Tue, 8/12/09, Jason Birch //* wrote: From: Jason Birch Subject: Re: [mapguide-users] Connection Problem To: "MapGuide Users Mail List" Date: Tuesday, 8 December, 2009, 11:34 AM Use something like fiddler2 to figure out what its trying to redirect you to. Maybe a host name or ip that is unreachable from your client. On 2009-12-07, manav dayal > wrote: > 192.168.224.135 - - [08/Dec/2009:11:00:58 +0530] "GET > /mapguide/mapviewerajax/?SESSION=ca1ee218---8000-0018f319f820_en_7F010AFC0AFB0AFA&WEBLAYOUT=Library://Samples/ms/Layouts/ms.WebLayout > HTTP/1.1" 302 472 > > > This is the 3rd entry in the access log of apache. > All further entries are missing. > > Where can I find the file to which this 302 redirection is taking place > /mapguide/mapviewerajax/ > > > I have ran out of options to resolve the issue. > Desperately seeking help!! > > Thanks and Regards. > > > > > --- On Mon, 7/12/09, manav dayal > wrote: > > > From: manav dayal > > Subject: Re: [mapguide-users] Connection Problem > To: "MapGuide Users Mail List" > > Date: Monday, 7 December, 2009, 1:06 PM > > > > > > > > Zac > I am unable to view any map using different machine. > > > Thanks and Regards. > > > --- On Mon, 7/12/09, Zac Spitzer > wrote: > > > From: Zac Spitzer > > Subject: Re: [mapguide-users] Connection Problem > To: "MapGuide Users Mail List" > > Date: Monday, 7 December, 2009, 12:42 PM > > > looking at yourscreenshot again, it appears the problem is the sample code > is hardwired to refer to > localhost:8008 hence the problem... > > can you view a normal map without using the javasamples from another > machine? > > > > 2009/12/7 Zac Spitzer > > > ok, can you install the firebox addon and enable the net tab, > often is can be a missing file, which should show up in red > under the net tab > > > > > z > > > > > 2009/12/7 manav dayal > > > > > > > > I tried it on Firefox > It is showing the following error on the console: > > Error: parent.parent.mapFrame is undefined > Source File: > http://192.168.224.24:8008/mapguide/javasamples/common/pageLoadFunctions.js > Line: 25 > > Rest of them are warnings. > > I am attaching the ScreenShot as well. > > > Thanks and Regards. > > > > > > --- On Mon, 7/12/09, Zac Spitzer > wrote: > > > > From: Zac Spitzer > > Subject: Re: [mapguide-users] Connection Problem > To: "MapGuide Users Mail List" > > Date: Monday, 7 December, 2009, 11:25 AM > > > > > > 302 is a just a redirect, not an error, so I wouldn't worry so much about > that > > I note you mentioned using IE, does using Firefox make any difference? > Anything show up in the firefox error console? > > z > > > 2009/12/7 manav dayal > > > > > >
Re: [mapguide-users] 2.1 stability and speed
Try reducing the connection pool size to say 50. I've had issues where MapGuide runs out of open file handles if the default 200 is set. Regards, Kenneth Skovhede, GEOGRAF A/S Bruce Han skrev: Hi, Does anyone know how to improve Mapguide 2.1 stability and speed, Mine crashes on hourly basis sometime and error log only gives vague info? I have shape files and ARCSDE data source all linked through FDO. Are there any detailed documents about this kind of issues? Any help will be appreciated. Thanks Bruce ___ 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
Re: [mapguide-users] MGOS 2.1.0.4238 PROBLEM
For some reason the ASPX fails to load the dll's from the bin folder which contains the OSGeo.MapGuide namespace. As I mentioned, this is usually due to having the wrong .Net version on the folder. I saw your screenshot, but it was clipped so the output does not show the line that states "Microsoft .Net Framework version ". If that line states the correct version, you are either missing the dll files, or something else prevents them from loading, eg. execution issues, IIS lockdown issues, etc. It's more of an IIS issue than a MapGuide issue, so perhaps there are some log messages somewhere, indicating why the files in the bin folder fails to load. Also, if you have previously had MGOS 2.0 installed, have you made sure that it was uninstalled completely before installing 2.1? Regards, Kenneth Skovhede, GEOGRAF A/S balaji bitra skrev: Hi I am using pIV(3.2GHz),with 1gb ram and IIS 5.0 with oracle 10g,.NET framework 2.0. my (.NET)application is running well in the MGOS 2.0 with MAESTR0 1.0.9, but the problem is the same application in same system is not working in MGOS 2.1.0.4238 with MAESTRO (1.0.9,and r3911,r4358 tested in all).when i run the application it shows "OSGEO.MAPGUIDE" namespace error in common.aspx(22line).and the printscreen of error is: can any one help me. thanks in advance Balaji http://n2.nabble.com/file/n4104120/osgeo.bmp ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] copying styles
There is no import option in Studio, but there is one in Maestro. It works a little strange, you have to create a LayerDefinition and save it. You can then right click the layer and choose load from xml. Alternatively, you can just open the layer in Maestro, click the xml button, copy the xml fragment. Then open the target layer, click the xml button, and paste the contents. If you prefer not to use Maestro, you can send the xml directly to mapguide from the web interface: http://localhost/mapguide/mapagent/index.html The operation is named SetResourceContent. Regards, Kenneth Skovhede, GEOGRAF A/S Flavio Hendry skrev: hi all might be a stupid question, but is there a way to copy the sytle across sources? means: I created a thematic styling for landuse and would like to reuse it (or parts of it) for another source. I see that I can export a layer to XML (could then edit that); however I do not see an import ... thansk in advance for any help. Mit herzlichen Grüssen / Best Regards Flavio Hendry ___ 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
Re: [mapguide-users] MGOS 2.1.0.4238 PROBLEM
It usually means that the .Net bindings failed to load, which is usually cause by not having the correct .Net version (2.0 or greater) set for the website, or the website is in an app pool with a .Net 1.1 website. Regards, Kenneth Skovhede, GEOGRAF A/S balaji bitra skrev: Hi All I am running my application(asp/vb.net) using MGOS 2.0 it works fine, but the same application is not working on MGOS 2.1.0.4238 WITH MAESTRO 1.9.0 and King Oracle FDO 3.4.0.it throws the error as: "OSGEO.MAPGUIDE" name space error in "Common.aspx"(mapviewer net) at line 22. can any one help me thanks in advance Balaji ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Problem setting up connection with Maestro and SL King Oracle Provider
There is a defect logged against Maestro for displaying these ridiculosly large messageboxes. I don't know why the errors are there in the first place though, probably a minor bug in the Oracle provider. The message box is a standard Yes/No/Cancel messagebox which asks if you want to save anyway, so you can press Enter to get the default button (which is Yes), or press Y (or whatever shortcut key Yes has in your local version of Windows). Regards, Kenneth Skovhede, GEOGRAF A/S Flavio Hendry skrev: Hi again ops, second thought: no, I can't save, as I can't even enter a name for it ... what I get is a not resizable or scrollable window full of: "Failed to read entity properties: The remote server returned an error: (559)MgClassNotFoundException: The specified class was not found." this Window can only be closed (no buttons or whatsoever). After that I am back to Maestro. I think I get that message for every table entry in Oracle. PS: I am on Windows 7 64. Mit herzlichen Grüssen / Best Regards Flavio Hendry ___ 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
Re: [mapguide-users] Problem setting up connection with Maestro and SL King Oracle Provider
Are you sure you are using MGOS 2.1 final? I think there was a similar error in a previous version of MGOS 2.1 (and MGEP 2010). In any case, the message displayed by Maestro is a warning, and you should be able to save anyway. Regards, Kenneth Skovhede, GEOGRAF A/S Flavio Hendry skrev: Hi all I trying to setup a new resource with the SL King Oracle FDO Provider. I can setup the connection and test it and it works ("Provider reports no errors"). However I cannot save the connection. I get the following errors from Maestro (many of the same): "Failed to read entity properties: The remote server returned an error: (559)MgClassNotFoundException: The specified class was not found." - MG OS 2.1 - Maestro 1.1.0.4358 Thanks for any help. Mit herzlichen Grüssen / Best Regards Flavio Hendry ___ 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
Re: [mapguide-users] About spatial filter error
The OGR provider has limited query support. It can only support (spatial filer) (and/or) (single propertyfilter) Since the render engine adds the spatial filter, you can only use a single property filter on the layer, eg ID > 5. Regards, Kenneth Skovhede, GEOGRAF A/S SCLuna skrev: Hello every one I have another question I already made the buffer and select within working but only on sdf and sql data connection. my question is why is it that when my source data files is shape and mapinfo (OSGeo.OGR) the spatial filter is not working properly. I am trying to do the selectin buffer features on my data. hope anyone can help Regards, Sherwin ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Raster problems with MGOS 2.1
Have you tried the trick Jason posted? "I had to set DataConnectionPoolEnabled to 0 under the FeatureServiceProperties section of serverconfig.ini to get my install stable." Regards, Kenneth Skovhede, GEOGRAF A/S isca skrev: I have upgraded my MGOS 2.0.1 towards 2.1 and the improvement in speed is incredible. But the problem child of MGOS since the beginning seems still to exist -> rasters. When turning raster layers on/off in the viewer I get very fast an error indicating "can make no more connections to GDAL provider". Although the service doesn't crash anymore the web api seems to stuck. Is there a way to overcome this problem (increasing the number of allowed connections ?) ? ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] WMS and Failed to stylize layer in EPSG 31467 on MGOS 2.1
2.x is a more demanding in terms of coordinate system compatibility. Previously, you were allowed to have empty coordinate systems. If your map has the correct coordinate system specified, you can check all your FeatureSource items to see if they have the correct projection defined, otherwise add a "coordinate system override". If you use the preview version of Maestro, you can run the validation tool on the map (big green V icon), and it will tell you what if a FeatureSource has a different coordinate system. Regards, Kenneth Skovhede, GEOGRAF A/S Axel Dörr skrev: *Montag, 30.11.2009* Hello List, I need some express help. I´ve updated MGOS 1.X to 2.1 on Windows 2000 Server with IIS5. Everything is fine now except for the WMS-Service which I deliver. There are no rasterimages involved. In the trace.log I find the following error: Error: Failed to stylize layer: path and name of layer The coordinate system initialization failed. Could not initialize the geodetic transformation The Coordinates are in EPSG:31467 (Germany, Gauss-Krueger). In MG Studio 2009, the definition of the serviceproperties looks like this: north="5375600"/> This worked fine with MGOS 1.X. What has changed with MGOS 2.1 and which settings will be needed now? Thanks for help! Regards, Axel Dörr Ingenieurbüro Siebenmuehlenstraße 36 70771 Leinfelden-Echterdingen Tel: +49 (0)711 99 760 7-60 Fax: +49 (0)711 99 760 7-80 Email: mailto:i...@doerrib.de Web: http://www.doerrib.de Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ___ 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
Re: [mapguide-users] SHP Feature source update
"Invalid stream header exception" is usually an indication that you are using an incompatible version of the WebAPI dlls. Eg. You install MGOS 2.0, and copy the dll's to your project. You then upgrade to MGOS 2.1, but forget to upgrade the dll's. Regards, Kenneth Skovhede, GEOGRAF A/S smeurant skrev: I made the change. I still have a "Invalid stream header exception" but the new feature is successfully added to the feature source . I will check where the exception come from and I will update my post later. Thanks for your help Kenneth. Kenneth Skovhede, GEOGRAF A/S wrote: MgLayer is the name of the class that is used for runtime layers. Im guessing that layer.GetClassName() returns "MgLayer". Have you tried with GetFeatureClassName(): http://mapguide.osgeo.net/files/mapguide/docs/webapi/d6/de2/class_mg_layer_a983e24398d337eff4809830993eb992.html#a983e24398d337eff4809830993eb992 Regards, Kenneth Skovhede, GEOGRAF A/S smeurant skrev: Hi all, I try to update a SHP feature source using the MapGuide Java API with a servlet. But i have a problem with this step : featureService.UpdateFeatures(FeatureSourceID,featureCommandCollection,false); Like say the API doc , it return a MgPropertyCollection. And in this propertyCollection, i found a error msg sent by FDO : An exception occurred in FDO component. FDO class 'MgLayer' not found in schema. Is the problem come from my implementation or, is it a bug in MGOS 2.1b? Thanks for your help P.S : You can find the full servlet implementation in the attached file http://n2.nabble.com/file/n4076428/updateFeatureSource.java updateFeatureSource.java ___ 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
Re: [mapguide-users] Raster not loading
The GDAL provider (aka OSGeo FDO Provider for Raster) usually reports "success", even when it fails completely. Try debugging, using these instructions: http://trac.osgeo.org/fdo/wiki/FdoGdalNotes (btw. MGOS 2.1 is out, and has stable raster support, 2.0.2 is known to be unstable with rasters) Regards, Kenneth Skovhede, GEOGRAF A/S LLEUNDD skrev: We have just upgraded our MGOS to version 2.0.2.3011 on a windows 2008 IIS 7 box and I can't get my Autodesk Mapguide Studio authoring tool to load raster imagery. I was using ECW imagery, however I found a post saying that ECWs were not inherently supported in versions 2.0/2.1. I then changed my imagery to a .jpg and uploaded the files to a local drive on the server. To load the imagery I did the following: - Right click and select New-> Data Connection - Select OSGEO FDO Provider for Raster - input my local path to the file i.e., C:\inetpub\wwwroot\XYZ Custom Sites\GIS\Backup\imagery.ecw - Tested connection (connection is good) - Save - Right click to create new data layer - Selected the imagery data source - saved new layer I can not get the imagery to show in either a new map or in the preview mode. Of note, no matter what I put as my local path to the imagery (could be something that does not even exist (i.e., c:\smith)) it seems to say the connection is good. Can anyone comment on this? Cheers! ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] SHP Feature source update
MgLayer is the name of the class that is used for runtime layers. Im guessing that layer.GetClassName() returns "MgLayer". Have you tried with GetFeatureClassName(): http://mapguide.osgeo.net/files/mapguide/docs/webapi/d6/de2/class_mg_layer_a983e24398d337eff4809830993eb992.html#a983e24398d337eff4809830993eb992 Regards, Kenneth Skovhede, GEOGRAF A/S smeurant skrev: Hi all, I try to update a SHP feature source using the MapGuide Java API with a servlet. But i have a problem with this step : featureService.UpdateFeatures(FeatureSourceID,featureCommandCollection,false); Like say the API doc , it return a MgPropertyCollection. And in this propertyCollection, i found a error msg sent by FDO : An exception occurred in FDO component. FDO class 'MgLayer' not found in schema. Is the problem come from my implementation or, is it a bug in MGOS 2.1b? Thanks for your help P.S : You can find the full servlet implementation in the attached file http://n2.nabble.com/file/n4076428/updateFeatureSource.java updateFeatureSource.java ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Disable zoom and drag on one map, but not onother.
AFAIK, the version you have written should work with sessionId. Regards, Kenneth Skovhede, GEOGRAF A/S Bojan Franc @ FER skrev: Thx again. I managet to get it working with USERNAME and PASSWORD... - - But still, would like to use SESSION if possible. I initialize MGOS WebTier... Create one frame with IMG tag with getMapImage... And one with complete weblayout. I suppose I dont initialize the resource needed for the mapAgent to work, am I right? This is my PHP test page... - Open($userInfo); } catch (MgException $e) { echo "Could not connect to the MapGuide site server. Please contact the MapGuide site administrator."; die(); } try { $sessionId = $site->CreateSession(); $siteConnection = new MgSiteConnection(); $siteConnection->Open(new MgUserInformation($sessionId)); $resourceService = $siteConnection->CreateService(MgServiceType::ResourceService); $mdResourceId = new MgResourceIdentifier("Library://Demo/Maps/Demo.MapDefinition"); $mapName = $mdResourceId->GetName(); // Define some constants $webLayout = "Library://Demo/Layouts/Demo.WebLayout"; $title = "Demo"; } catch (MgException $e) { echo "ERROR: " . $e->GetMessage("eng") . "\n"; echo $e->GetStackTrace("eng") . "\n"; } ?> To: "MapGuide Users Mail List" Sent: Friday, November 27, 2009 12:35 PM Subject: Re: [mapguide-users] Disable zoom and drag on one map,but not onother. I don't think the information about the two avalible methods are correct. Generally, for a MapGuide call, you can either supply SESSION= or USERNAME=&PASSWORD= The purpose of this is authentication, and either works (I think APPLYPACKAGE is different?). You cannot use MAPNAME because that requires that you have pre-created a runtime map in the given session, and there is no HTTP interface to create or manipulate a runtime map. Try tagging a valid SESSION= parameter to the GETMAPIMAGE call, and it should work well. Alternatively try using USERNAME=Anonymous&PASSWORD= Regards, Kenneth Skovhede, GEOGRAF A/S Bojan Franc @ FER skrev: Thx for help. I am trying to use getMapImage now, it does exactly what I need. I just cant get it working with SESSION and MAP parameters. It says... Session Id and Map Name ... or ... Locale and Client Agent and Map Definition. It works with the second set of parameters, but requires a login each time I open the page. With Session Id and Map Name I get an error... MgResourceNotFoundException Resource was not found: Session:034a83a2-bd61-102c-8000-000c2993e1ac_en_7F010AFC0AFB0AFA//Demo.Map I am using the same variables for calling the WebLayout of my detailed map, and it works fine. I also tried to copy/paste session and map name into MapAgent interface, but get the same error. My variable shows me MapName "Demo", and the error says "Demo.Map". It added the ".Map" at the end of the string. Where can I read more about getMapImage and similar API functions? I was looking for it in MapGuide Web API Reference and MapGuide Viewer API Reference but was unable to find anything related. Regards, Bojan Franc - Original Message - From: "Kenneth Skovhede, GEOGRAF A/S" To: "MapGuide Users Mail List" Sent: Thursday, November 19, 2009 8:56 AM Subject: Re: [mapguide-users] Disable zoom and drag on one map, but not onother. For the "static" map, you could simply use the GETMAPIMAGE call, and then manually control layer visibility. Basically: 1) On startup, create the MG session and runtime map 2) Create a html page with an pointing to: http://servername/mapaguide/mapagent/mapagent.fcgi?OPERATION=GETMAPIMAGE&SESSION=&MAPNAME=&seq=number> 3) Start a javascript that reloads the with a new random number each 60 seconds 4) Provide controls to turn on/off layers and toggle these in server code If you need a full viewer (eg, tile support, etc.), you can use OpenLayers to display the map, and disable the navigation controls. It would be a little bit difficult to use a standard WebLayout and disable all mouse controls. *) The GETMAPIMAGE call probably requires more parameters, check the test page: http://localhost/mapguide/mapagent/index.html Regards, Kenneth Skovhede, GEOGRAF A/S bojanfr...@fer skrev: Hi, I need to make 2 maps. One windowed (small) with no ability to zoom or move. The other full screen map with all the features MapGuide has. First map should be a static map refreshing every 1 minute but users should not be able to zoom on it or move. It should be a "static" map. What the users should be able to do is to enable and disable som
Re: [mapguide-users] why "parent.parent.mapFrame.DigitizeRectangle(OnRectangleDigitized); " don t work for selection features in map ????
Take a look at the frame layout, "MapGuide Developers Guide" page 25 (labeled "page 19"): http://mapguide.osgeo.org/2.0/documentation.html "parent" refers to the parent frame. Depending on what frame your javascript executes from, you need more or less "parent" references. The problem is described on page 26-27 (labelled 20-21). I recommend that you use the function "getMapFrame()" instead, as that is avalible in almost all frames, and automatically finds the mapframe. Regards, Kenneth Skovhede, GEOGRAF A/S syncro balon skrev: Hi i want indestand why "*parent.parent*.mapFrame.DigitizeRectangle(OnRectangleDigitized);" don t work and i m having value null bat with "*parent.parent.parent*.mapFrame.DigitizeRectangle(OnRectangleDigitized);" is work but *without selecting features *in Map Please help me Messenger débarque dans Hotmail ! Essayez-le ! <http://www.windowslive.fr/hotmail/web-messenger/> ___ 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
Re: [mapguide-users] Disable zoom and drag on one map, but not onother.
I don't think the information about the two avalible methods are correct. Generally, for a MapGuide call, you can either supply SESSION= or USERNAME=&PASSWORD= The purpose of this is authentication, and either works (I think APPLYPACKAGE is different?). You cannot use MAPNAME because that requires that you have pre-created a runtime map in the given session, and there is no HTTP interface to create or manipulate a runtime map. Try tagging a valid SESSION= parameter to the GETMAPIMAGE call, and it should work well. Alternatively try using USERNAME=Anonymous&PASSWORD= Regards, Kenneth Skovhede, GEOGRAF A/S Bojan Franc @ FER skrev: Thx for help. I am trying to use getMapImage now, it does exactly what I need. I just cant get it working with SESSION and MAP parameters. It says... Session Id and Map Name ... or ... Locale and Client Agent and Map Definition. It works with the second set of parameters, but requires a login each time I open the page. With Session Id and Map Name I get an error... MgResourceNotFoundException Resource was not found: Session:034a83a2-bd61-102c-8000-000c2993e1ac_en_7F010AFC0AFB0AFA//Demo.Map I am using the same variables for calling the WebLayout of my detailed map, and it works fine. I also tried to copy/paste session and map name into MapAgent interface, but get the same error. My variable shows me MapName "Demo", and the error says "Demo.Map". It added the ".Map" at the end of the string. Where can I read more about getMapImage and similar API functions? I was looking for it in MapGuide Web API Reference and MapGuide Viewer API Reference but was unable to find anything related. Regards, Bojan Franc - Original Message - From: "Kenneth Skovhede, GEOGRAF A/S" To: "MapGuide Users Mail List" Sent: Thursday, November 19, 2009 8:56 AM Subject: Re: [mapguide-users] Disable zoom and drag on one map, but not onother. For the "static" map, you could simply use the GETMAPIMAGE call, and then manually control layer visibility. Basically: 1) On startup, create the MG session and runtime map 2) Create a html page with an pointing to: http://servername/mapaguide/mapagent/mapagent.fcgi?OPERATION=GETMAPIMAGE&SESSION=&MAPNAME=&seq=number> 3) Start a javascript that reloads the with a new random number each 60 seconds 4) Provide controls to turn on/off layers and toggle these in server code If you need a full viewer (eg, tile support, etc.), you can use OpenLayers to display the map, and disable the navigation controls. It would be a little bit difficult to use a standard WebLayout and disable all mouse controls. *) The GETMAPIMAGE call probably requires more parameters, check the test page: http://localhost/mapguide/mapagent/index.html Regards, Kenneth Skovhede, GEOGRAF A/S bojanfr...@fer skrev: Hi, I need to make 2 maps. One windowed (small) with no ability to zoom or move. The other full screen map with all the features MapGuide has. First map should be a static map refreshing every 1 minute but users should not be able to zoom on it or move. It should be a "static" map. What the users should be able to do is to enable and disable some layers on the map, nothing more. It's like a "demo" map for unregistered users. The second map will be available to registered users displayed at full screen with all Mapguide features enable. Can it be done? If so, any help is appreciated. I am using MGOS 2.1 with PHP. Regards ___ 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