[mapguide-users] Update legend information on runtime
Hi! I am using MapGuide version 3.1.0.9064 on a computer with Windows 10 Enterprise and IIS. Using Application definition (Fusion layout), with slate index.html I have a map with 864 layers on the map. I have made shortcut functions to turn of and on layers and layergroups on runtime: Example: InitializeWebTier(); userInfo = new MgUserInformation(mgSessionId); siteConnection = new MgSiteConnection(); siteConnection.Open(userInfo); MgMap map = new MgMap(siteConnection); map.Open(resourceService, mgMapName); laygroup = GetLayerGroupByName(map, "mylayergroupname"); setLayerGroupVisible(laygroup, false); lay = GetLayerByName(map, "mylayername"); setLayerVisible(lay, false); map.Save(); map.Dispose(); The map is updated when I have run the code and run map.redraw(); in javascript. But I also want to update the legend so the user know what layergroups and layers have been turned on or off, so then I run map.reloadMap(); in javascript. First time I do this it works fine, but if I run the shortcut to change layer settings with som other layers turned on, and run map.reloadMap(); nothing happends on the legend. The map show the changed information after map.redraw(); so that works fine. What am I doing wrong? Why is it only possible to run map.reloadMap(); once for me? Is there a better call to refresh the legend, I think map.reloadMap(); is a real performance killer? I have searched information about this, but the only function I have found to update the legend is map.reloadMap();. //Dan -- Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html ___ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] PostGIS view with a join not selectable
Did you set up the primary key of your database data source? " http://www.w3.org/2001/XMLSchema; targetNamespace="http://fdo.osgeo.org/schemas/feature/dbo; xmlns:fdo="http://fdo.osgeo.org/schemas; xmlns:gml="http://www.opengis.net/gml; xmlns:dbo="http://fdo.osgeo.org/schemas/feature/dbo; elementFormDefault="qualified" attributeFormDefault="unqualified"> UNIQUE ID*" /> " -- Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html ___ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] PostGIS view with a join not selectable
I have same problems and this is not related to schema override. I have created layers based on views with joins and selection work as it should. For me it happens also for layers which feature source are tables without any join. Try to create new map and use same problematic layer, I have tried and then selection works, but not always. Sometimes I create new layer and then it start working. This is strange and not fully understandable why its happens, its a bit random. Kajar -- Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html ___ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] PostGIS view with a join not selectable
Thanks for your help. I ended up just removing the extra extensions that I wasn't using (postgis_topology, postgis_tiger_geocoder, postgis_sfcgal) and dropped the corresponding schemas. When I did that, I was able to export the configuration for the PostGIS database with no errors. I then edited the XML and put it into Maestro. I now have a new problem (still very related to this). I'm able to "select" the parcel and read all the data, but when I select A parcel, I get ALL the parcels (8k+ features). Thanks, Ethan -- Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html ___ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users
Re: [mapguide-users] PostGIS view with a join not selectable
Hi techdude1996, How about doing the following steps: 1. Create temporal database, and create a "Table" with the same fields and field types and set up a primary key properly. 2. Use the FDO Toolbox to generate a usable XML text/file for the table. 3. Replace the table name in XML to the name of your spatial view and load from the target database. I think it should work. I am a SQL Server user, but it's how I resolve the issue of SQL Server Spatial view cannot be selected on MapGuide. Cheers, Reno -- Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html ___ mapguide-users mailing list mapguide-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapguide-users