-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi_layers_list.html
84 lines (74 loc) · 3.55 KB
/
api_layers_list.html
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
<!DOCTYPE html>
<html>
<head>
<title>GeoAPI layers list</title>
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap.min.css" rel="stylesheet" media="screen">
<script type="text/javascript" src="http://api.geoportail.lu/build/latest/ext-base.js"></script>
<script type="text/javascript" src="http://api.geoportail.lu/build/latest/ext-all.js"></script>
<script type="text/javascript" src="http://api.geoportail.lu/build/latest/geoadmin.js"></script>
<script type="text/javascript" src="http://api.geoportail.lu/api.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.3/underscore-min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/bootstrap.min.js"></script>
</head>
<body>
<script type="text/html" id='usageList' >
<h2>Layers available through the GeoAPI</h2>
<a href="http://api.geoportail.lu/">Back to the API documentation</a>
<table class="table table-striped table-condensed">
<thead>
<tr>
<th title="layer identifier to use in addLayerToMap() method">Id</th>
<th title="full name of the layer">Name</th>
<th title="image format of layer tiles">Format</th>
<th title="true if the layer is a wms service, if false tile service">is_wms</th>
<th title="if the layer supports featureinfo requests on click">queryable</th>
<th title="feature geometry type">type</th>
<th title="image format of wms">wms_format</th>
<th title="linked legend identifier">legendName</th>
<th title="linked metadata catalog identifier">metadataID</th>
</tr>
</thead>
<tbody>
<% _.each(items,function(item,key,list){ %>
<% var name = item.name || "N/A"; %>
<% var format= item.format || "N/A"; %>
<% var is_wms= item.is_wms || false; %>
<% var queryable= item.queryable || false; %>
<% var ftype= item.type || "N/A"; %>
<% var wms_format= item.wms_format || "N/A"; %>
<% var legendName= item.legendName || "N/A"; %>
<% var metadataID= item.metadataID || false %>
<tr>
<!-- use variables -->
<td><a title="Preview the layer in the Geoportail" target="_blank" href="http://map.geoportail.lu/?layers=<%= key %>"><%= key %></a></td>
<td class="name">
<%= name %>
<div id="demo" class="collapse out"> lorem ipsum</div>
</td>
<td class="format"><%= format %></td>
<td class="is_wms"><%= is_wms %></td>
<td class="queryable"><%= queryable %></td>
<td class="type"><%= ftype %></td>
<td class="wms_format"><%= wms_format %></td>
<td class="legendName"><%= legendName %></td>
<% if(metadataID) { %>
<td class="metadataID"><a title="Get More Details of this dataset" target="_blank"
href="http://www.geoportal.lu/Portail/menuAction.do?lang=fr&dispatch=load&menuToLoad=inspireViewMetadataExt&uid=<%= metadataID %>"> MetaData </a></td>
<% } else { %>
<td class="metadataID">N/A</td>
<% }; %>
</tr>
<% }); %>
</tbody>
</table>
</script>
<!-- Create your target -->
<div id="target"></div>
<script type="text/javascript" >
var template = $("#usageList").html();
var geo = new geoadmin.API({lang: 'de'});
$("#target").html(_.template(template,{items:geo.layers}));
</script>
</body>
</html>