-
Notifications
You must be signed in to change notification settings - Fork 2
/
api-via-javascript-add-wms-via-function.html
56 lines (52 loc) · 1.84 KB
/
api-via-javascript-add-wms-via-function.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
<!DOCTYPE html>
<html><head>
<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">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>Lusc API via JavaScript - WMS toevoegen via JavaScript functie addWMS()</title>
<link rel="stylesheet" href="./styles/default/style.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
html {
width: 100%;
height: 100%;
font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif;
}
body {
width: 100%;
height: 100%;
margin: 0px;
}
#map {
width: 100%;
height: 100%;
}
.olControlAttribution {
bottom: 3px!important;
background-color: #eee;
}
</style>
<script src="./OpenLayers.js"></script>
<script src="./javascripts/proj4js-compressed.js"></script>
<script src="lusc-api.js"></script>
<script>
var api = null;
function init() {
api = new Lusc.Api({});
//Beschikbare kaartlagen: alert(api.getLayers());
//Het pad naar de markertypes: alert(api.getMarkerPath());
//Beschikbare markertypes: alert(api.getMarkers());
//Pan naar een andere locatie: api.setLocation([100000,400000]);
//Zoom naar een ander zoomnivo: api.setZoomLevel(3);
//Op basis van de locatie van de client inzoomen op de kaart
//navigator.geolocation.getCurrentPosition(showLocation);
api.setLocation([116667,477208]);
api.setZoomLevel(8)
api.addWMS("http://qgiscloud.com/luuk/westwijk_qgiscloud/wms","westwijk_qgiscloud")
}
</script>
</head>
<body onload="init();">
<div id="map"></div>
</body>
</html>