source: trunk/src/map/index.php@ 7768

Last change on this file since 7768 was 7767, checked in by janveeden, 15 years ago
  • Property svn:eol-style set to native
File size: 4.2 KB
Line 
1<?php
2require_once("../config.php");
3require_once($config['root']."/map/inc/kmlHandler.php");
4
5$markers = getArrayFromKML();
6
7# Key is defined to be the domain name if exists
8$apikey = $config['googlekey']['default'];
9$servername = $_SERVER['SERVER_NAME'];
10
11# Little hack, does not work with foo.co.uk domains
12$servername = implode('.',array_slice(explode('.',$servername),-2));
13if (array_key_exists($servername,$config['googlekey'])) {
14 $apikey = $config['googlekey'][$servername];
15}
16?>
17
18<html>
19<head>
20<title>Nodemap Wireless Leiden</title>
21<!-- External stylesheet for all browsers -->
22<link href="style/stylesheet.css" rel="stylesheet" type="text/css">
23<!-- Using stylesheet2.css when browser is any version of Microsoft Internet Explorer -->
24<!--[if IE]>
25 <link href="style/stylesheet2.css" rel="stylesheet" type="text/css">
26<![endif]-->
27
28<!-- Make our $marker[] array from kmlHandler available to javascript in JSON (No idea on how to this another less ugle way)-->
29<script>
30var markers = <?php echo json_encode($markers); ?>;
31</script>
32
33<!-- Loading in the google-api -->
34<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php print $apikey;?>" type="text/javascript"></script>
35<!-- Loading in the markerClusterer that will handle the clustering of markers. -->
36<script type="text/javascript" src="inc/markerClusterer.js"></script>
37<!-- Loading in the javascript that will add the map into #mapcanvas -->
38<script type="text/javascript" src="inc/nodemapWL.js"></script>
39<script type="text/javascript" src="inc/overlay.js"></script>
40
41<!-- Loading in the javascript that handles the switching between gebruiker and beheerder -->
42<script type="text/javascript" src="inc/gebruiker_beheerder_switch.js"></script>
43</head>
44<body>
45<!-- Mainwrapper contains all content on the page -->
46<div id="mainwrapper">
47 <!-- Mapcanvas is the container where the map will be put in. Height and width of map is specified by size of the div -->
48 <div id="mapcanvas">
49 <!-- Create the map using the intitialize_map() function from nodemapWL.js -->
50 <script type="text/javascript">initialize_map();</script>
51 <!--<script type="text/javascript">nodeAdd();</script>-->
52 </div>
53 <div id="infowrapper">
54 <!-- Top information space -->
55 <div id="infotop">
56 <!-- Calling on the node information from an external php file. inc/node_info.php -->
57 <?php ?>
58 </div>
59
60 <!-- Bottom information space -->
61 <div id="infobottom">
62 <!-- This contains the searchbox of the searchtool, and the send button for it -->
63 <div id="searchbox">
64 <form>
65 <input type="text" name="naam" size="18" maxlength="30"><input type="button" name="knop" value=" > ">
66 </form>
67 </div>
68 <!-- This contains the list of nodes, in future the searchbox will make it possible to filter this list -->
69 <div id="searchlist">
70 <select multiple>
71 <option value="node1">Node 1 Leiden</option>
72 <option value="node2">Node 2 Leiden</option>
73 <option value="node3">Node 3 Leiden</option>
74 <option value="node4">Node 4 Leiden</option>
75 <option value="node5">Node 5 Leiden</option>
76 <option value="node6">Node 6 Leiden</option>
77 <option value="node7">Node 7 Leiden</option>
78 <option value="node8">Node 8 Leiden</option>
79 <option value="node9">Node 9 Leiden</option>
80 <option value="node10">Node 10 Leiden</option>
81 </select>
82 </div>
83 </div>
84 <!-- The buttons under the searchframe. In a table for positioning. -->
85 <div id="userpick">
86 <table>
87 <tr><!-- onclick events activate functions from within inc/gebruiker_beheerder_switch.js which load in the selected view with node_info.php -->
88 <td><input type="button" value="Gebruiker" onclick="switchGebruiker();"></td>
89 <td><input type="button" value="Beheerder" onclick="switchBeheerder();"></td>
90 </tr>
91 </table>
92 </div>
93 </div>
94
95 <!-- General functions under the map -->
96 <div id="navigation">
97 <form>
98 <table>
99 <tr>
100 <!-- First colum -->
101 <td>
102 <input type="checkbox" value="shownodes" onclick="toggleMyKml();" checked="checked">Toon nodes
103 </td>
104 <!-- Second colum -->
105 <td>
106 <input type="checkbox" value="showrange">Toon dekking <br/>
107 <input type="checkbox" value="showtraffic">Toon dataverkeer
108 </td>
109 </tr>
110 </table>
111 </form>
112 </div>
113</div>
114</body>
115</html>
Note: See TracBrowser for help on using the repository browser.