[mapguide-users] MapGuide OpenLayers 6 Example without NODE

GordonL gordon.luckett at arrowgeomatics.com
Fri Jan 8 07:28:55 PST 2021


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


More information about the mapguide-users mailing list