forked from jumpinjackie/rhok-spatialtruth
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index_mobile.php
637 lines (590 loc) · 28.8 KB
/
index_mobile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
<?php
require_once("constants.php");
function CreateRuntimeMap($resourceSrvc, $sessionId, $mdfId)
{
$map = new MgMap();
$resId = new MgResourceIdentifier($mdfId);
$mapName = $resId->GetName();
$map->Create($resourceSrvc, $resId, $mapName);
//create an empty selection object and store it in the session repository
$sel = new MgSelection($map);
$sel->Save($resourceSrvc, $mapName);
//Save the runtime map blob
$mapStateId = new MgResourceIdentifier("Session:" . $sessionId . "//" . $mapName . "." . MgResourceType::Map);
$map->Save($resourceSrvc, $mapStateId);
return $map;
}
MgInitializeWebTier(dirname(__FILE__)."/../webconfig.ini");
try
{
$mapDefinition = "Library://RHOK/Map/SphericalMercator.MapDefinition";
$siteConn = new MgSiteConnection();
$userInfo = new MgUserInformation("Anonymous", "");
$siteConn->Open($userInfo);
$site1 = $siteConn->GetSite();
$sessionId = $site1->CreateSession();
$userInfo->SetMgSessionId($sessionId);
$siteConn->Open($userInfo);
$map = new MgMap($siteConn);
//common resource service to be used by all scripts
$resourceSrvc = $siteConn->CreateService(MgServiceType::ResourceService);
$map = CreateRuntimeMap($resourceSrvc, $sessionId, $mapDefinition);
$csFactory = new MgCoordinateSystemFactory();
$origSRS = $map->GetMapSRS();
$mapCs = $csFactory->Create($origSRS);
$metersPerUnit = $mapCs->ConvertCoordinateSystemUnitsToMeters(1.0);
$mapExtents = $map->GetMapExtent();
$mapLL = $mapExtents->GetLowerLeftCoordinate();
$mapUR = $mapExtents->GetUpperRightCoordinate();
$layers = $map->GetLayers();
?>
<!doctype html>
<html>
<head>
<title>RHoK - Spatial Truth</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="css/bootstrap.css" />
<link rel="stylesheet" href="css/font-awesome.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/bootstrap-notify.css" />
<link rel="stylesheet" href="css/styles/alert-bangtidy.css" />
<link rel="stylesheet" href="css/styles/alert-blackgloss.css" />
<script src="http://maps.google.com/maps/api/js?v=3&sensor=false"></script>
<script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="js/OpenLayers-2.12/OpenLayers.js" type="text/javascript"></script>
<script src="js/OpenLayers.Control.LoadingPanel.js" type="text/javascript"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-notify.js"></script>
<style type="text/css">
#viewer { padding-top: 43px; }
#theNavbar { margin-bottom: 0px !important; }
.olControlLoadingPanel {
background-image:url(img/loading.gif);
position: relative;
right: 0;
top: 0;
width: 220px;
height: 19px;
background-position:center;
background-repeat:no-repeat;
display: none;
}
.notifications { z-index: 1000; }
.bottom-right { bottom: 70px !important; }
#viewer img { max-width:none; }
@media (max-width: 767px) {
body { padding-left: 0 !important; padding-right: 0 !important; }
}
</style>
<script type="text/javascript">
OpenLayers.ProxyHost = "xhrproxy.php?url=";
var metersPerUnit = <?= $metersPerUnit ?>; //value returned from mapguide
var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit;
OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit;
OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit;
OpenLayers.DOTS_PER_INCH = 96;
OpenLayers.Layer.MapGuide.prototype.SINGLE_TILE_PARAMS.format = "PNG8";
var vicMapLayers = {
<?php
for ($i = 0; $i < $layers->GetCount(); $i++) {
$layer = $layers->GetItem($i);
echo "'".$layer->GetName(). "': { objid: '".$layer->GetObjectId()."', visible: ".($layer->GetVisible() ? "true" : "false")." }";
if ($i < $layers->GetCount() - 1)
echo ",\n";
}
?>
};
//Pre-defined list of spatially-enabled RSS feeds. This list is barren because providers are not
//yet savvy enough to include cooridinates with their feed items
var dataFeeds = {
"CFA - Incidents": {
feedUrl: "http://osom.cfa.vic.gov.au/public/osom/IN_COMING.rss",
icon: new OpenLayers.Icon("img/fire.png", new OpenLayers.Size(24, 24))
},
"CFA - Warnings & Advice": {
feedUrl: "http://osom.cfa.vic.gov.au/public/osom/websites.rss",
icon: new OpenLayers.Icon("img/warning.png", new OpenLayers.Size(24, 24))
}
};
var posPopup = null;
var sessionId = '<?= $sessionId ?>';
var map = null;
var myPositionLayer = null;
var vicMapLayer = null;
var mapAgentUrl = "../mapagent/mapagent.fcgi";
var gotoScale = 16;
var metersPerUnit = 1.0; //value returned from mapguide
OpenLayers.DOTS_PER_INCH = 96;
var MessageType = {
INFO: "info",
SUCCESS: "success",
WARNING: "warning",
DANGER: "danger",
INVERSE: "inverse",
BLACKGLOSS: "blackgloss"
}
function notify(msgType, text) {
var msg = {};
switch (msgType)
{
case MessageType.INFO:
{
msg.html = "<i class='icon-info-sign'></i> " + text;
break;
}
case MessageType.SUCCESS:
{
msg.html = "<i class='icon-ok'></i> " + text;
break;
}
case MessageType.WARNING:
{
msg.html = "<i class='icon-warning-sign'></i> " + text;
break;
}
case MessageType.DANGER:
{
msg.html = "<i class='icon-minus-sign'></i> " + text;
break;
}
default:
{
msg.text = text;
}
}
$(".notifications").notify({
type: msgType,
message: msg
}).show();
}
function onResize() {
$("#viewer").height($(window).height() - $("#theNavbar").height());
if (map != null)
map.updateSize();
}
function mgKeepAlive() {
$.ajax({
url: mapAgentUrl + "?OPERATION=GETSITEVERSION&VERSION=1.0.0&SESSION=" + sessionId,
method: 'get',
success: function(data, status, xhr) {
console.log("Kept alive");
setTimeout(mgKeepAlive, 20000);
},
failure: function(jqXHR, textStatus, errorThrown) {
console.error("Session expired");
window.location.refresh();
}
});
}
function setVicMapLayerVisibility(layerName, bVisible) {
if (typeof(vicMapLayers[layerName]) != 'undefined') {
vicMapLayers[layerName].visible = bVisible;
var showLayers = [];
var hideLayers = [];
for (var name in vicMapLayers) {
if (vicMapLayers[name].visible === true) {
showLayers.push(vicMapLayers[name].objid);
} else {
hideLayers.push(vicMapLayers[name].objid);
}
}
if (vicMapLayer.getVisibility()) {
var params = {
ts : (new Date()).getTime(), //add a timestamp to prevent caching on the server
showLayers : showLayers.length > 0 ? showLayers.join(",") : null,
hideLayers : hideLayers.length > 0 ? hideLayers.join(",") : null
};
vicMapLayer.mergeNewParams(params);
}
}
}
function createMapGuideParams(mdfId, groupName) {
return {
session: '<?= $sessionId ?>',
mapName: '<?= $map->GetName() ?>',
//selectioncolor: "0xFF000000",
behavior: 2
}
}
function createMapGuideOptions() {
return {
isBaseLayer: false,
transitionEffect: 'resize',
buffer: 1,
useOverlay: true,
useAsyncOverlay: true,
singleTile: true,
units: "m",
maxExtent: new OpenLayers.Bounds(
15175240.12498,
-5058108.0785496,
17209076.573308,
-3893819.2638718
)
}
}
function initialView() {
map.zoomToExtent(new OpenLayers.Bounds(
15175240.12498,
-5058108.0785496,
17209076.573308,
-3893819.2638718
), true);
}
function setupMapGuideLayers(oMap) {
vicMapLayer = new OpenLayers.Layer.MapGuide("Vicmap - WMS", mapAgentUrl, createMapGuideParams("Library://RHOK/Map/Satellite.MapDefinition", "Vicmap WMS"), createMapGuideOptions());
oMap.addLayers([ vicMapLayer ]);
}
$(document).ready(function() {
$("#addressSearch").hide();
$(window).bind("resize", onResize);
onResize();
$("#viewer").width($("div.main").width());
$("#viewer").height($("div.main").height());
map = new OpenLayers.Map("viewer", {
restrictedExtent: new OpenLayers.Bounds(
15175240.12498,
-5058108.0785496,
17209076.573308,
-3893819.2638718
)
});
var osm = new OpenLayers.Layer.OSM();
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: google.maps.MapTypeId.TERRAIN}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets", // the default
{numZoomLevels: 20}
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}
);
myPositionLayer = new OpenLayers.Layer.Vector("My Current Position", {
styleMap : new OpenLayers.StyleMap({
externalGraphic: "img/marker.png",
graphicOpacity: 1.0,
graphicWidth: 24,
graphicHeight: 24,
})
});
map.addLayers([osm, gmap, gsat, ghyb, gphy]);
setupMapGuideLayers(map);
map.addLayers([myPositionLayer]);
map.addControl(new OpenLayers.Control.LoadingPanel());
map.addControl(new OpenLayers.Control.MousePosition())
map.zoomToMaxExtent();
checkAddressSearchValidity();
mgKeepAlive();
});
function isGoogleLayerActive() {
return map.baseLayer.CLASS_NAME === "OpenLayers.Layer.Google";
}
function setMyPositionMarker(lon, lat) {
myPositionLayer.removeAllFeatures();
var txPt = new OpenLayers.LonLat(lon, lat).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
);
var geom = new OpenLayers.Geometry.Point(txPt.lon, txPt.lat);
myPositionLayer.addFeatures([new OpenLayers.Feature.Vector(geom)]);
var pos = new OpenLayers.LonLat(lon, lat).transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
);
map.setCenter(pos, gotoScale);
return pos;
}
function setMarkerPopup(lon, lat, html) {
if (posPopup != null) {
posPopup.destroy();
map.removePopup(posPopup);
}
posPopup = new OpenLayers.Popup.FramedCloud("Popup",
new OpenLayers.LonLat(lon, lat), null,
html, null,
true // <-- true if we want a close (X) button, false otherwise
);
map.addPopup(posPopup);
}
function setMyPosition(lon, lat) {
var pos = setMyPositionMarker(lon, lat);
if (isGoogleLayerActive()) {
//NOTE: 2500 daily request limit for API key-less operations
//and only can be used in conjunction with a Google map being displayed
var url = OpenLayers.ProxyHost + encodeURIComponent("http://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat + "," + lon + "&sensor=true");
$.getJSON(url, function(data, status, xhr) {
if (data.status === "OK") {
if (data.results.length > 0) {
setMarkerPopup(pos.lon, pos.lat, "<strong>Address:</strong> " + data.results[0].formatted_address)
}
} else {
alert("Geocode request failed: " + data.status)
}
});
}
}
function populateBaseLayers() {
var basehtml = "";
var overhtml = "";
for (var i = 0; i < map.layers.length; i++) {
var layer = map.layers[i];
if (layer.isBaseLayer) {
if (layer.getVisibility()) {
basehtml += "<div class='controls'><label class='radio'><input type='radio' name='baselayername' checked='checked' value='" + layer.name + "' /><i class='icon-reorder'></i> " + layer.name + "</label></div>";
} else {
basehtml += "<div class='controls'><label class='radio'><input type='radio' name='baselayername' value='" + layer.name + "' /><i class='icon-reorder'></i> " + layer.name + "</label></div>";
}
} else {
if (layer == myPositionLayer) //Skip this layer
continue;
if (layer == vicMapLayer) { //You're treated specially
for (var vlName in vicMapLayers) {
var vlLayer = vicMapLayers[vlName];
if (vlLayer.visible) {
overhtml += "<div class='controls'><label class='checkbox'><input data-vicmap-layer-name='" + vlName + "' type='checkbox' checked='checked' value='" + vlName + "' /><i class='icon-reorder'></i> " + vlName + "</label></div>";
} else {
overhtml += "<div class='controls'><label class='checkbox'><input data-vicmap-layer-name='" + vlName + "' type='checkbox' value='" + vlName + "' /><i class='icon-reorder'></i> " + vlName + "</label></div>";
}
}
} else {
if (layer.getVisibility()) {
overhtml += "<div class='controls'><label class='checkbox'><input type='checkbox' checked='checked' value='" + layer.name + "' /><i class='icon-reorder'></i> " + layer.name + "</label></div>";
} else {
overhtml += "<div class='controls'><label class='checkbox'><input type='checkbox' value='" + layer.name + "' /><i class='icon-reorder'></i> " + layer.name + "</label></div>";
}
}
}
}
$("#baseLayerList").html(basehtml + overhtml);
}
function populateDataFeeds() {
var html = "";
for(var name in dataFeeds) {
html += "<div class='controls'><label class='checkbox'><input type='checkbox' value='" + name + "' /><i class='icon-rss'></i> " + name + "</label></div>";
}
$("#dataFeedList").html(html);
}
function findLayerByName(layerName) {
for (var i = 0; i < map.layers.length; i++) {
if (map.layers[i].name === layerName) {
return map.layers[i];
}
}
return null;
}
function checkAddressSearchValidity() {
if (isGoogleLayerActive())
$("#addressSearch").show();
else
$("#addressSearch").hide();
}
function applyLayerVisibility() {
notify(MessageType.INFO, "Applying layer visibility");
var showVicMapLayers = [];
var hideVicMapLayers = [];
$("input", "#baseLayerList").each(function(i, e) {
var el = $(e);
if (typeof(el.attr("data-vicmap-layer-name")) != 'undefined') {
var oldVal = vicMapLayers[el.val()].visible;
if (oldVal != el.is(":checked")) {
vicMapLayers[el.val()].visible = el.is(":checked");
if (el.is(":checked"))
showVicMapLayers.push(vicMapLayers[el.val()].objid);
else
hideVicMapLayers.push(vicMapLayers[el.val()].objid)
}
} else {
var layer = findLayerByName(el.val());
if (layer != null)
layer.setVisibility(el.is(":checked"));
if (layer.getVisibility() && layer.isBaseLayer)
map.setBaseLayer(layer);
}
});
if (showVicMapLayers.length > 0 || hideVicMapLayers.length > 0) {
var params = {
ts : (new Date()).getTime(), //add a timestamp to prevent caching on the server
showLayers : showVicMapLayers.length > 0 ? showVicMapLayers.join(",") : null,
hideLayers : hideVicMapLayers.length > 0 ? hideVicMapLayers.join(",") : null
};
vicMapLayer.mergeNewParams(params);
}
checkAddressSearchValidity();
notify(MessageType.SUCCESS, "Layer visibility changed");
$("#viewer").focus();
}
function applyDataFeeds() {
notify(MessageType.INFO, "Applying data feeds");
var removeLayers = [];
for (var i = 0; i < map.layers.length; i++) {
if (map.layers[i].CLASS_NAME === "OpenLayers.Layer.GeoRSS") {
removeLayers.push(map.layers[i]);
}
}
for (var i = 0; i < removeLayers.length; i++) {
map.removeLayer(removeLayers[i]);
}
var layers = [];
$("input:checked", "#dataFeedList").each(function(i, e) {
var name = $(e).val();
var feed = dataFeeds[name];
layers.push(
(typeof(feed.icon) != 'undefined') ?
new OpenLayers.Layer.GeoRSS(name, feed.feedUrl, { icon: feed.icon }) :
new OpenLayers.Layer.GeoRSS(name, feed.feedUrl)
);
});
if (layers.length > 0) {
map.addLayers(layers);
var bounds = new OpenLayers.Bounds();
for (var i = 0; i < layers.length; i++) {
var lyr = layers[i];
var lyrBounds = lyr.getExtent();
if (lyrBounds != null)
bounds.extend(lyrBounds);
}
map.zoomToExtent(bounds, true);
notify(MessageType.SUCCESS, "Data Feeds Applied");
}
$("#viewer").focus();
}
function performAddressQuery() {
if (isGoogleLayerActive()) {
var addr = $("#qryAddress").val();
notify(MessageType.INFO, "Performing Address Query");
//NOTE: 2500 daily request limit for API key-less operations
//and only can be used in conjunction with a Google map being displayed
var url = OpenLayers.ProxyHost + encodeURIComponent("http://maps.googleapis.com/maps/api/geocode/json?address=" + addr + "&sensor=true");
$.getJSON(url, function(data, status, xhr) {
if (data.status === "OK") {
if (data.results.length > 0) {
var res = data.results[0];
if (typeof(res.geometry) != 'undefined') {
notify(MessageType.INFO, "Going to first result");
var lonlat = new OpenLayers.LonLat(
res.geometry.location.lng,
res.geometry.location.lat
).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
setMyPositionMarker(res.geometry.location.lng, res.geometry.location.lat);
map.setCenter(lonlat, gotoScale);
}
} else {
notify(MessageType.DANGER, "Specifed address query returned no results");
}
} else if (data.status == "ZERO_RESULTS") {
notify(MessageType.DANGER, "Specifed address query returned no results");
} else {
notify(MessageType.DANGER, "Google Geocoding API Error: " + data.status);
}
});
} else {
alert("Can only search addresses with a Google layer visibile. Sorry, Terms of Service requires it");
}
$("#viewer").focus();
return false;
}
function myLocation() {
navigator.geolocation.getCurrentPosition(function(pos) {
setMyPosition(pos.coords.longitude, pos.coords.latitude);
notify(MessageType.SUCCESS, "Zoomed to your location");
}, function(err) {
notify(MessageType.DANGER, "Could not locate your current position");
}, { timeout: 5000 }); //default timeout is infinite! Real smart!
}
</script>
</head>
<body>
<div id="theNavbar" class="navbar navbar-inverse">
<div class="navbar-inner" style="-webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0;">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">RHoK - Spatial Truth</a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="javascript:myLocation()"><i class="icon-screenshot"></i> My Location</a></li>
<li><a href="javascript:initialView()"><i class="icon-check-empty"></i> Initial View</a></li>
<li><a href="#baseLayerModal" data-toggle="modal" onclick="populateBaseLayers()"><i class="icon-align-justify"></i> Layers</a></li>
<li><a href="#dataFeedsModal" data-toggle="modal" onclick="populateDataFeeds()"><i class="icon-rss"></i> Data Feeds</a></li>
</ul>
<form id="addressSearch" class="navbar-search pull-right" onsubmit="return performAddressQuery()">
<input type="text" id="qryAddress" class="search-query" placeholder="Address Search">
</form>
</div><!-- /.nav-collapse -->
</div><!-- /.container -->
</div><!-- /navbar-inner -->
</div><!-- /navbar -->
<div id="viewer">
</div>
<div class='notifications bottom-right'></div>
<!-- Base Layers -->
<div id="baseLayerModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="baseLayerModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="baseLayerModalLabel"><i class="icon-align-justify"></i> Base Layers</h3>
</div>
<div class="modal-body">
<p>Choose the layers you want to see on this map</p>
<div class="control-group" id="baseLayerList">
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" onclick="applyLayerVisibility()"><i class="icon-ok"></i> Apply</button>
</div>
</div>
<!-- Data Feeds -->
<div id="dataFeedsModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="dataFeedsModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="dataFeedsModalLabel"><i class="icon-rss"></i> Data Feeds</h3>
</div>
<div class="modal-body">
<p>Tick the data feeds to show on this map</p>
<div class="control-group" id="dataFeedList">
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" onclick="applyDataFeeds()"><i class="icon-ok"></i> Apply</button>
</div>
</div>
</body>
</html>
<?php
}
catch (MgException $e)
{
$phpErrorMessage = $e->getMessage();
$phpStackTrace = $e->getTraceAsString();
$initializationErrorMessage = $e->GetExceptionMessage();
$initializationErrorDetail = $e->GetDetails();
$initializationErrorStackTrace = $e->GetStackTrace();
echo "<p>An error occurred during initialization</p>";
echo "<strong>PHP Exception Information</strong>";
echo "<p>Message: $phpErrorMessage</p>";
echo "<p>Stack Trace: <pre>$phpStackTrace</pre></p>";
echo "<strong>MapGuide Exception Information</strong>";
echo "<p>Message: $initializationErrorMessage</p>";
echo "<p>Detail: $initializationErrorDetail</p>";
echo "<p>Stack Trace: <pre>$initializationErrorStackTrace</pre></p>";
}
catch (Exception $e)
{
$phpErrorMessage = $e->getMessage();
$phpStackTrace = $e->getTraceAsString();
echo "<p>An error occurred during initialization</p>";
echo "<strong>PHP Exception Information</strong>";
echo "<p>Message: $phpErrorMessage</p>";
echo "<p>Stack Trace: <pre>$phpStackTrace</pre></p>";
}
?>