1 | goog.require('ol.Map');
|
2 | goog.require('ol.View');
|
3 | goog.require('ol.layer.Image');
|
4 | goog.require('ol.source.ImageMapGuide');
|
5 |
|
6 | var mdf = 'Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition';
|
7 | var agentUrl =
|
8 | 'http://data.mapguide.com/mapguide/mapagent/mapagent.fcgi?USERNAME=Anonymous';
|
9 | var bounds = [
|
10 | -87.865114442365922,
|
11 | 43.665065564837931,
|
12 | -87.595394059497067,
|
13 | 43.823852564430069
|
14 | ];
|
15 | var map = new ol.Map({
|
16 | layers: [
|
17 | new ol.layer.Image({
|
18 | extent: bounds,
|
19 | source: new ol.source.ImageMapGuide({
|
20 | projection: 'EPSG:4326',
|
21 | url: agentUrl,
|
22 | useOverlay: false,
|
23 | metersPerUnit: 111319.4908,
|
24 | params: {
|
25 | MAPDEFINITION: mdf,
|
26 | FORMAT: 'PNG'
|
27 | },
|
28 | ratio: 2
|
29 | })
|
30 | })
|
31 | ],
|
32 | target: 'map',
|
33 | view: new ol.View({
|
34 | center: [-87.7302542509315, 43.744459064634],
|
35 | projection: 'EPSG:4326',
|
36 | zoom: 12
|
37 | })
|
38 | });
|