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

Last change on this file since 7778 was 7769, checked in by janveeden, 15 years ago

Fixed map to work again (went back a revision). Next up is config to work again. (Backed-up broken map).

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