-
Notifications
You must be signed in to change notification settings - Fork 305
Expand file tree
/
Copy pathSharpMapServer.js
More file actions
49 lines (46 loc) · 1.77 KB
/
SharpMapServer.js
File metadata and controls
49 lines (46 loc) · 1.77 KB
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
// Declaration of Namespaces and 'Enums'
if (typeof SharpMap == 'undefined') {
SharpMap = {};
}
SharpMap.Server = function () {
this.UpdateStatus = function () {
$('#serverStatus').html("loading status....");
$.ajax({
url: 'admin/services?operation=status',
dataType: 'json',
success: function (data) {
$("#serverStatus").html(data.Version);
}
});
}
this.UpdateWMSLayers = function () {
$("#wmsLayerList").html("Loading layerlist...");
$.ajax({
url: 'admin/services?operation=getwmslayers',
dataType: 'json',
success: function (data) {
$("#wmsLayerList").html("");
var html = "";
for (i = 0; i < data.layers.length; i++) {
html += i + ". <b>" + data.layers[i].Name + "</b> | <a href=\"Demo.aspx?layerName=" + encodeURIComponent(data.layers[i].Name) + "\" target=\"_blank\">Demo</a><br/>";
}
$("#wmsLayerList").html(html);
}
});
}
this.UpdateBasicSettings = function () {
$.ajax({
url: 'admin/services?operation=generalsettings',
dataType: 'json',
success: function (data) {
$("#settsTitle").val(data.Title);
$("#settsAbstract").val(data.Abstract);
$("#settsAccessConstraints").val(data.AccessConstraints);
$("#settsContactInformation").val(data.ContactInformation);
$("#settsFees").val(data.Fees);
$("#settsKeywords").val(data.Keywords);
$("#settsOnlineResource").val(data.OnlineResource);
}
});
}
}