Re: [mapguide-users] Show MapGuide Map using OpenLayers
Thank you very much I will check that out. -- 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] Show MapGuide Map using OpenLayers
I'll slightly roll back my previous statement. If you are using vanilla OpenLayers and add mapguide-rest to your 2.5.2 installation (mapguide-rest should work for 2.5.2) it nicely polyfills these missing APIs, but you'll have to modify your OL examples to talk to the mapguide-rest endpoint instead of the mapagent. You can refer to examples like this (https://github.com/jumpinjackie/mapguide-rest/blob/master/sampleapps/mixed/ol3.html) or visit the root sampleapps/index.php for more examples using vanilla OpenLayers in a mapguide-rest context. Also, mapguide-react-layout out of the box only talks to the mapagent. It can't talk to mapguide-rest. - Jackie -- 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] Show MapGuide Map using OpenLayers
Sorry, 2.5.2 is too old and does not have the key mapagent operations needed for mapguide-react-layout to operate out of the box: * CREATERUNTIMEMAP/DESCRIBERUNTIMEMAP - Introduced in MGOS 2.6 * QUERYMAPFEATURES 2.6.0 - Introduced in MGOS 2.6 - Jackie -- 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] Show MapGuide Map using OpenLayers
Thank you very much, it works now. -- 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] Show MapGuide Map using OpenLayers
mapagent operations are versioned by the [version of MapGuide the operation was first introduced or updated in] So in this particular case, the params refer to the parameters of a GETMAPIMAGE operation, which according to this (sadly incomplete) mapagent reference: https://trac.osgeo.org/mapguide/wiki/HttpApi/RenderingService And some enhancement work I've put in: https://trac.osgeo.org/mapguide/wiki/MapGuideRfc148 There are 3 versions of this operation: - 1.0.0 - 2.0.0 - 3.0.0 As you are on MGOS 2.5.2, this means the only applicable versions you can use are 1.0.0 and 2.0.0. Consult the respective links for an idea of what parameters you can pass for the respective operation version. - Jackie -- 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
[mapguide-users] Show MapGuide Map using OpenLayers
Hello, I'm trying to display a MapGuide Map using OpenLayer v6.1.0. I can see the Map in preview in Maestro but the Map does not showing up in OpenLayers, the example from here works fine: https://openlayers.org/en/latest/examples/mapguide-untiled.html I don't understand the Version parameter, which is set to 3.0.0 in the example code. Is this the MapGuide Version? I'm using MapGuide 2.5.2 This is my code so far: var agentUrl = 'http://192.168.128.176:85/mapguide/mapagent/mapagent.fcgi?'; var mdf = 'Library://Test/Maps/Test.MapDefinition'; var mapguide = new ol.source.ImageMapGuide({ projection: 'EPSG:31467', url: agentUrl, useOverlay: false, metersPerUnit: 1.00, params: { MAPDEFINITION: mdf, FORMAT: 'PNG', VERSION: '2.5.2', USERNAME: 'Administrator', PASSWORD: 'admin' }, ratio: 1 }) var layersource = new ol.layer.Image({ source: mapguide }) var map = new ol.Map({ layers: [layersource], target: 'map', view: new ol.View({ zoom: 12, center: [3474969.4459683, 5494505.61502864] }) }); There are no errors, just a white screen with zoom control. This is the information I obtained from maestro for that test map: *PROJCS["DHDN/3.Gauss3d-3",GEOGCS["DHDN/3.LL",DATUM["DHDN/3",SPHEROID["BESSEL",6377397.155,299.15281535],TOWGS84[598.1000,73.7000,418.2000,-0.202000,-0.045000,2.455000,6.7000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",350.000],PARAMETER["false_northing",0.000],PARAMETER["scale_factor",1.],PARAMETER["central_meridian",9.00],PARAMETER["latitude_of_origin",0.00],UNIT["Meter",1.00]]* -- 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