The code did not come across:

var mdf = 'Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition';
var agentUrl = 'http://localhost/mapguide/mapagent/mapagent.fcgi?';
var bounds = [
    -9769953.6613122,
    5417808.88017179,
    -9762220.79944397,
    5434161.22418638];

const myMgLayer = new ol.layer.Image({
    extent: bounds,
    source: new ol.source.ImageMapGuide({
      projection: 'EPSG:3857',
      url: agentUrl,
      useOverlay: false,
      metersPerUnit: 1, //value returned from mapguide
      params: {
        MAPDEFINITION: mdf,
        FORMAT: 'PNG',
        VERSION: '3.0.0',
        USERNAME: 'Administrator',
        PASSWORD: 'admin',
      },
      ratio: 2,
    }),
  });

  map.addLayer(myMgLayer);



--
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

Reply via email to