[mapguide-users] MapGuide 3.1 Add or edit the map on Runtime
Hi, For those who are upgrading from a 2.x version of MapGuide and can no longer add / edit layers or basically manipulate the map during runtime please read this post around the changes made to the mgmap constructor. http://themapguyde.blogspot.com.au/2013/03/mapguide-tidbits-mgmap-constructor.html Basically if your old code has something like: $map = new MgMap(); $map->Open($resourceService,$mapName); Then you are going to have to change the way you get a handle on the current map. A very simple example can be found in \mapguide\web\www\samples\change_layers_Via_dom.xyz (if you remembered to install the samples). Hope this helps. Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Mapguide 2.6 and 3.0 Can't run Mapadmin or mapagent?
Hi, Have you confirmed that php & the Mapguide/php integration has been configured correctly on IIS. The simplest way of doing this is to create a php file in the www folder of your mapguide installation that contains the following code; Once that has been created op http://localhost/mapguide/ If it is all working you should see a page showing the installed & correctly running components of your php installation, & one of these items should be called Mapguide. Hope this helps Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Mapguide 3.0 - Composite style not displaying in fusion legend
All, Any thoughts? I have done some further investigations myself and found; 1) legend works fine in AJAX for simple and composites 2) if I preview the layers or maps in either maestro or studio then they work fine 3) it is only composite layers that do not display correct in the legend, they display correctly on the map though. I have also found this is the issue in MapGuide 2.6.1. I have tried; 1) importing a package from a 2.6 server with the same results 2) importing the repository from a 2.6 server then run an rep. upgrade same results 3) brand new installation of 3.0 on a brand new virtual server ... yep same results Data sources are shape, mapinfo tab and oracle (not that this seems to make a difference). Any help here would be greatly appreciated. Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] Mapguide 3.0 - Composite style not displaying in fusion legend
All, I've notice an issue in the fusion legend widget after upgrading a site to 3.0. If I have a point, line or polygon style on a vector layer then the relevant style is displayed correctly in the legend for both the Fusion and AJAX viewers. However if I have a composite style then only the Legend in AJAX is viewing correctly, in fusion I get the default icon i.e. blue image icon. Any thoughts on what I have done wrong or any config(s) I need to change? I ran a repository update thinking that it might have been a legacy layer/map schema issue but I get the same issue with newly created layers as well. Thanks in advance for any help. Regards Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Mapguide 3.0 - Composite style not displaying in fusion legend
Jackie, Yes the composite styles do have a value set in the runtimemap\layer\ScaleRange\FeatureStyle\rule\icon Interestingly the values are different between 2 composite, so it Is not just picking up a default style. Below is a copy of the JSON; {"RuntimeMap":{"@version":["3.0.0"],"@xmlns:xsi":["http://www.w3.org/2001/XM LSchema-instance"],"@xsi:noNamespaceSchemaLocation":["RuntimeMap-3.0.0.xsd"] ,"BackgroundColor":[""],"CoordinateSystem":[{"EpsgCode":["3857"],"Me ntorCode":["WGS84.PseudoMercator"],"MetersPerUnit":["1"],"Wkt":["PROJCS[\"WG S84.PseudoMercator\",GEOGCS[\"LL84\",DATUM[\"WGS84\",SPHEROID[\"WGS84\",6378 137.000,298.25722293]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.01745329251 9943295]],PROJECTION[\"Popular Visualisation Pseudo Mercator\"],PARAMETER[\"false_easting\",0.000],PARAMETER[\"false_northing\", 0.000],PARAMETER[\"central_meridian\",0.00],UNIT[\"Meter\",1.000 000]]"]}],"DisplayDpi":["96"],"Extents":[{"LowerLeftCoordinate":[{"X ":["13941204.309762172"],"Y":["-1045038.0637799533"]}],"UpperRightCoordinate ":[{"X":["14071718.113563014"],"Y":["-949375.83516509994"]}]}],"IconMimeType ":["image/gif"],"Layer":[{"ActuallyVisible":["true"],"DisplayInLegend":["tru e"],"ExpandInLegend":["true"],"FeatureSource":[{"ClassName":["Default:Airpor ts"],"Geometry":["Geometry"],"ResourceId":["Library://IPG/Data/Airports.Feat ureSource"]}],"LayerDefinition":["Library://IPG/Layers/Airports_mark.LayerDe finition"],"LegendLabel":["Airports_mark"],"Name":["Airports_mark"],"ObjectI d":["90f35dc6-5589-11e5-8001-80ee7331b0d1"],"ScaleRange":[{"FeatureStyle":[{ "Rule":[{"Filter":null,"Icon":["R0lGODlhEAAQAIQAAAQCBJyenFRSVNza3Dw+PAwODLSy tGxqbPz6/AwKDBQWFLy6vHx+fAQGBKyurOTm5BQSFGxubPz+/Ly+vP///wAA ACH5BAEAABQALAAQABVeICWOFACQKJoUaQskydmSgKLI s9hER5OPkMkEkgJAjscCAlFAHk2FQmCxGEgkA2ogenoVDNewxFCI0RIMMcNcFIgFONT3QSA8yK6E o7xysM9sL38jK3EAZUVxIiYjIQA7"],"LegendLabel":null}],"Type":["1"]}],"MaxScale ":["1"],"MinScale":["0"]}],"Selectable":["true"],"Type":["1"],"V isible":["true"]},{"ActuallyVisible":["true"],"DisplayInLegend":["true"],"Ex pandInLegend":["true"],"FeatureSource":[{"ClassName":["Default:Health_Hospit al"],"Geometry":["Geometry"],"ResourceId":["Library://IPG/Data/Health_Hospit al.FeatureSource"]}],"LayerDefinition":["Library://IPG/Layers/Health_Hospita l.LayerDefinition"],"LegendLabel":["Health_Hospital"],"Name":["Health_Hospit al"],"ObjectId":["90f5c00c-5589-11e5-8000-80ee7331b0d1"],"ScaleRange":[{"Fea tureStyle":[{"Rule":[{"Filter":null,"Icon":["R0lGODlhEAAQAMIAAAQmTIQeTCQuXBQ yZAQmXPQKNP///wAAACH5BAEAAAYALAAQABNCaKowEQOsuVopkVKLpa7DlX1M2G1AChD mQKjpIM/CJcxzcO18//TAHQQ3qBVuRNiq9YJtWh4SZySFkkqi6KfxoCoSADs="]}],"Type":["4 "]}],"MaxScale":["1"],"MinScale":["0"]}],"Selectable":["true"]," Type":["1"],"Visible":["true"]},{"ActuallyVisible":["true"],"DisplayInLegend ":["true"],"ExpandInLegend":["true"],"FeatureSource":[{"ClassName":["Default :PROJECTS"],"Geometry":["Geometry"],"ResourceId":["Library://IPG/Data/PROJEC TS.FeatureSource"]}],"LayerDefinition":["Library://IPG/Layers/PROJECTS.Layer Definition"],"LegendLabel":["PROJECTS"],"Name":["PROJECTS"],"ObjectId":["90f 5c00c-5589-11e5-8001-80ee7331b0d1"],"ScaleRange":[{"FeatureStyle":[{"Rule":[ {"Filter":null,"Icon":["R0lGODlhEAAQAOMAAAQCBETSBNRyDHS2BORqBAT+BNxuDMSCBP// /wAAACH5BAEAAAgALAAQABRBEMkJhAAza3IO0WAVBBeY cUXhmZKYkpiJpuoXCgFdwOCsrxmXblea+IZAhHBIjB2ZqyWz+Zx6cNMhyTDoer9fQwQAOw=="]}] ,"Type":["4"]}],"MaxScale":["1"],"MinScale":["0"]}],"Selectable" :["true"],"Type":["1"],"Visible":["true"]},{"ActuallyVisible":["true"],"Disp layInLegend":["true"],"ExpandInLegend":["true"],"FeatureSource":[{"ClassName ":["Default:Airports"],"Geometry":["Geometry"],"ResourceId":["Library://IPG/ Data/Airports.FeatureSource"]}],"LayerDefinition":["Library://IPG/Layers/Air ports.LayerDefinition"],"LegendLabel":["Airports"],"Name":["Airports"],"Obje ctId":["90f82270-5589-11e5-8000-80ee7331b0d1"],"ScaleRange":[{"FeatureStyle" :[{"Rule":[{"Filter":null,"Icon":["R0lGODlhEAAQAIQCBP///yH5BAEAAAEAL AAQABIjjI+py+0IYjxyVkkvvoaH+mkZMFomRGpTwoEP9oTku8Zz7BQAOw=="]}],"Type":[ "4"]}],"MaxScale":["1"],"MinScale":["0"]}],"Selectable":["true"] ,"Type":["1"],"Visible":["true"]}],"MapDefinition":["Library://IPG/Maps/mark _test.MapDefinition"],"Name":["mark_test1441648513025"],"SessionId":["8f331d 96-5589-11e5-8000-80ee7331b0d1_en_MTI3LjAuMC4x0AFC0AFB0AFA"],"SiteVersion":[ "3.0.0.8701"]}} ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] WFS issues - index out of bounds
Evening All, I'm using MapGuide 2.6 to produce a WFS output. Generally everything is working fine, however for 2 layers (out of 30) I am receiving the following error; An exception occurred in FDO component. Error occurred in Feature Source (Library:// /WFS.FeatureSource): Item index out of bounds. (Cause: , Root Cause: Item index out of bounds. ) But if I set the MAXFEATURES = 400 everything works fine (there are just under 700 records for this layer). The layer contains both polygons and points, the data source is Oracle and I am using the SL king FDO with control table (to remove the ~'s from layer names). The data displays correctly as a layer in mapguide. I've checked the data and there isn't any special characters (%, &, ~, !, etc) in there. Is there a file size / payload limit with WFS? There are some very complex polygon's coming back. Any thoughts or help would be greatly appreciated. Thanks Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] WFS issues - index out of bounds
Hi all, Please don't worry about this one. I've found the issue. The problem only occurs when we have 2 different geometry types in the 1 response, so the resolution I'll be implementing is 2 have separate data connection for each geometry type. Thanks Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] mapguide-rest feedback
Hi Gordon, Yes, JQuery + Mapguide = very cool functionality. To order your results use the following parameters orderBy=column name orderOption=ascending or descending so in your example try this; $.ajax({ url: /mapserver2015/rest/library/Samples/Sheboygan/Layers/Parcels.LayerDefinitio n/features.geojson, dataType: json, data: { filter: RBILAD LIKE ' + request.term + %', orderBy= RBILAD, orderOption=ascending },/ You can also specify which field(s) get returned by using the properties tag. This helps to cut down on the amount of traffic required for auto complete functions. Hope this helps. Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
[mapguide-users] null label value
All, I know this is an old issue but I'm wondering if there is a plan to fix it (the issue was introduced in 2.4). Process: You have layer which has a display label linked to a field in the data, for this email let's call it label_text. Prior to 2.4 if label_text = null (value not text) then no label was rendered on the map . from my PoV this is the expected behaviour. After 2.4 if label_text = null then the word 'text' is render as the label rather than no label. The current work around that I have been using is to decode the null value to ' ' so the map looks correct. My question is . Can this be resolved or is this by design to fix another issue? I had a look through the tickets and couldn't find any around this issue so please let me know if you think it is worthwhile opening one. Regards Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] How to update FDO provider
Mal, I tried it myself and have found a couple of problem The windows link in http://trac.osgeo.org/mapguide/wiki/maestro/UserGuides/UpdatingFDOInstallati on actually provides you with 3.3.1 versions of the FDO's ... for mapguide 2.6 you need version 3.8.x FDO's As per Crispin's response why do you need to change from the default FDO? If you really need to replace the dll's (not recommended) please forget the steps in the above link and do the following; 1) download the windows 64bit SDK from http://fdo.osgeo.org/content/fdo-380-downloads 2) extract the files in the zip to c:\temp 2) stop the MapGuide service 3) take a back up of your current FDO folder 4) delete all files and folders within the existing FDO folder 5) copy all files and folders from c:\temp\fdosdk-win64-3.8.0_3601\bin\ to the fdo folder in you mapguide install 6) restart MapGuide And that should work (worked for me on a server 2008 install). Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Stop services
Mal, You need to have administrator or at least power user privileges to restart services on a windows machine. The other option is to ask your system administrator to give you access to restart the MapGuide and apache or IIS (depending on your install) services on your MG server. This can be done via group policies or active directory. Hope this helps Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Stop services
Mal, A couple things to do so we can help you; 1) Check that the MapGuide server service is running. 2) Look in MapGuide install path\server\logs\error.log see what the latest entry is (or simply post a sample of any repeated errors to the group). That should help diagnose the issue. 3) Can you also confirm that MapGuide was working correctly prior to updating the FDO's. Regards Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] sql filters on map load
Further to Gordon's response, if you look at http://localhost/mapguide/help/devguide/index.html (on the server that you have installed MapGuide OS on) and go to the section called modifying maps and layers you will see some examples and a work through of what the code is doing. Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] mapguide-rest feedback
Jackie, Firstly I would just like to say it's a very powerful tool kit. I've implemented on a number of my clients sites. I've used it in a couple of different ways; Option 1 I have a containing page using jquery/dojo objects reading mapguide rest url's for dynamic content and an iframe for the map (just a tool bar across the top). In the map iframe I have hooks into various mapwidget events that control the URL's used by the different jquery/dojo objects in the host page. i.e. select an object and the photo slider, impact analysis report and cross section panel all dynamically update. Option 2 Same setup as per option 1 but I have replaced many of the default mapguide widgets with jquery/dojo ones (selection panel, legend, etc). very simple to implement and made my long standing issue with the legend panel disappear (3 stage check boxes are wonderful!!). Option 3 Simple image creation. The basic requirement of producing an image for polygon number 1234 at a scale of 1:50,000. Instead of approx. 200 lines of PHP code (site connection, create session, get extents of objects, build map, load a custom layer to highlight the polygon, print, close session.) has turned into a single URL and some parameters in a json file. I have now integrated this functionality with intelledox to automatically generate maps and reports for environment impacts and emergency response plans. Issues/tweaks I've had to make to the responses (pretty much all are just string operations in php code) Calls to get the current list layers for the map; 1) would be nice if it include the link to generate the legend icon 2) would be nice if it also returned the sub styles as well as the layers Calls against the current selection set; 1) would be nice if it returned only the fields that have been set/selected for the layer (layer properties visible in viewer section in maestro) rather than all fields. 2) a variable (true/false) whether the geometry records should be returned. And one extra really, really nice tool would be a utility that created a smarty template for KML by reading a layer definition. Thanks again for developing this tool kit. Mark P.S. a donation is on your way once I get paid for some of these sites. ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] MapAgent SetResource in a batch
Hi, There are a couple of ways of doing this. Below is some php code to get the definition of a layer, modify it and then updated the new definition back into library. With a simple modification you could change it so it reads the new definition from a file (just replace the $updated_string with the xml string from the file). You can run this code either from a web page or command prompt. $installDir ='C:\\Program Files\\OSGeo\\MapGuide\\'; $extensionsDir = $installDir . 'Web\\www\\'; $viewerDir = $extensionsDir . 'mapviewerphp\\'; include $viewerDir . 'constants.php'; $layer_path = 'Library://alayer.LayerDefinition'; try { //MgInitializeWebTier ($webconfigFilePath); MgInitializeWebTier($extensionsDir . /webconfig.ini); //create a new site connection $siteConnection = new MgSiteConnection();//new MgSite(); $siteConnection-Open(new MgUserInformation('Administrator','admin')); //build a reference to the resource service $resourceService = $siteConnection-CreateService(MgServiceType::ResourceService); //get the definition of the layer and create an xml object from it $resId = new MgResourceIdentifier($layer_path); $byteReader = $resourceService-GetResourceContent($resId); $data_connection_XML = $byteReader-ToString(); $doc = DOMDocument::loadXML($data_connection_XML); //modify the $doc variable as required i.e. find needle and replace with haystack $updated_string= str_replace('needle' , 'haystack' , $doc); // create a new xml definition from the updated string $updated_doc = DOMDocument::loadXML($updated_string); $DataDefinition = $updated_doc-saveXML(); //create the mgbyte source object $byteSource = new MgByteSource($DataDefinition, strlen($DataDefinition)); $byteSource-SetMimeType(MgMimeType::Xml); //save the updated layer definition $newResId = new MgResourceIdentifier($layer_path); $resourceService-SetResource($newResId, $byteSource-GetReader(), null); } catch (MgException $e) { echo Mapguide ERROR: . $e-GetMessage(eng) . \n; echo $e-GetStackTrace(eng) . \n; echo $e-GetDetails().\n; } ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] MapGuid clustering
It really depends on how you are using Mapguide as to which option would be the best. I’ll outline the 2 methods I have used in the past but of course there are multiple ways of dealing with the issue. Option 1 – out of the box approach with a single, outward facing, server and a number of slave map rendering servers. This is what you get with MapGuide, with no customization, just a bit of configuration. It’s been awhile since I have done this but from memory the process is: 1) Install all of MapGuide (server and web components) as per normal on server A. 2) On server B install only the MapGuide server component and when asked either enter the static IP address of Server A or its name if using dynamic IP’s. 3) On server C install only the MapGuide server component and when asked either enter the static IP address of Server A or its name if using dynamic IP’s. I think I am missing one step but that is basically it. Server A will then handle all the web service calls and server B, C, etc will handle the map generation. Just make certain that you have the same FDO providers on all the servers. There used to be some examples of this process on the MapGuide Wiki but I couldn’t find them. Option 2 – Using a load balancer, to control multiple MapGuide servers. This option allows for failover and I’ve find it the best option if you are using a tiles. There are a lot of load balancers out there so I’m not going to name any products, it all depends on your budget and preferred OS. The basic process is this; 1) Install all of MapGuide (server and web components) as per normal on server A. 2) Install all of MapGuide (server and web components) as per normal on server B. 3) Install all of MapGuide (server and web components) as per normal on server C. 4) On Server A create your data connections, layers, maps, tiles, custom code, etc, etc. 5) Create a package on server A and copy it and customizations to servers B C 6) Import the package on servers B C, and tiles, code, etc. 7) Install the load balancer on server D and configure a common base URL which will point to the same shared folder on Servers A, B, C i.e. http://serverD/maps will point to http://serverA/mapguide; http://serverB/mapguide, http://serverC/mapguide 8) The load balancer will then automatically switch the user between A, B, C depending on server’s status and current load The problem with both of the above options is a potential for file lock issues if you are using file based data sources. This can be resolved by having a central file share which updates local copies of the files on each of MapGuide installations. Hope that helps. Mark ___ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] Mapguide opensource fdo to GE smallworld
Hi, I've implemented the FDO for Smallworld developed by Spatial Business systems. It works very well and takes advantages of TiCS, ACE's, alternatives, multiple worlds, and all those other acronyms concepts that are unique to Smallworld. Let me know if you need more info (and yes it works in both AutoCAD and Mapguide). Mark -Original Message- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of mredwings Sent: Friday, 27 June 2014 3:11 AM To: mapguide-users@lists.osgeo.org Subject: [mapguide-users] Mapguide opensource fdo to GE smallworld Hi All, Does anyone have a FDO Connection from Mapguide or Autocad Map to pull data from GE smallworld? This just has to pull one way. Thanks Matt -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-opensource-fdo-to-GE-smallworld -tp5148177.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