1 | <?php
|
---|
2 | require_once("../config.php");
|
---|
3 | require_once($config['root']."/map/inc/kmlHandler.php");
|
---|
4 | require_once($config['root']."/map/inc/node_info_start.php");
|
---|
5 | require_once($config['root']."/map/inc/search_node.php");
|
---|
6 |
|
---|
7 | #getting array from kmlHandler
|
---|
8 | $markers = get_node_array($config['kml_file']);
|
---|
9 |
|
---|
10 | # Key is defined to be the domain name if exists
|
---|
11 | $apikey = $config['googlekey']['default'];
|
---|
12 | $servername = $_SERVER['SERVER_NAME'];
|
---|
13 |
|
---|
14 | # Little hack, does not work with foo.co.uk domains
|
---|
15 | $servername = implode('.',array_slice(explode('.',$servername),-2));
|
---|
16 | if (array_key_exists($servername,$config['googlekey'])) {
|
---|
17 | $apikey = $config['googlekey'][$servername];
|
---|
18 | }
|
---|
19 | ?>
|
---|
20 |
|
---|
21 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
---|
22 | <html lang="dutch">
|
---|
23 | <head>
|
---|
24 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
---|
25 | <title>Nodemap Wireless Leiden</title>
|
---|
26 | <!-- External stylesheet for all browsers -->
|
---|
27 | <link href="style/stylesheet.css" rel="stylesheet" type="text/css">
|
---|
28 | <!-- Using stylesheet2.css when browser is any version of Microsoft Internet Explorer -->
|
---|
29 | <!--[if IE]>
|
---|
30 | <link href="style/stylesheet2.css" rel="stylesheet" type="text/css">
|
---|
31 | <![endif]-->
|
---|
32 |
|
---|
33 | <!-- Make our $marker[] array from kmlHandler available to javascript in JSON (No idea on how to this another less ugle way)-->
|
---|
34 | <script type="text/javascript">
|
---|
35 | var markers = <?php echo json_encode($markers); ?>;
|
---|
36 | </script>
|
---|
37 |
|
---|
38 | <!-- Loading in the google-api -->
|
---|
39 | <script src="http://maps.google.com/maps?file=api&v=2&key=<?php print $apikey;?>" type="text/javascript"></script>
|
---|
40 | <!-- Loading in the markerClusterer that will handle the clustering of markers. -->
|
---|
41 | <script type="text/javascript" src="inc/markerClusterer.js"></script>
|
---|
42 | <!-- Loading in the javascript that will add the map into #mapcanvas -->
|
---|
43 | <script type="text/javascript" src="inc/nodemapWL.js"></script>
|
---|
44 | <script type="text/javascript" src="inc/overlay.js"></script>
|
---|
45 | <script type="text/javascript" src="inc/iconStyles.js"></script>
|
---|
46 |
|
---|
47 | <!-- Loading in the javascript that handles the switching between gebruiker and beheerder -->
|
---|
48 | <script type="text/javascript" src="inc/gebruiker_beheerder_switch.js"></script>
|
---|
49 |
|
---|
50 | </head>
|
---|
51 | <body onload="suggestMarkers('')">
|
---|
52 | <!-- Mainwrapper contains all content on the page -->
|
---|
53 | <div id="mainwrapper">
|
---|
54 | <!-- Mapcanvas is the container where the map will be put in. Height and width of map is specified by size of the div -->
|
---|
55 | <div id="mapcanvas">
|
---|
56 | <!-- Create the map using the intitialize_map() function from nodemapWL.js -->
|
---|
57 | <script type="text/javascript">initialize_map();</script>
|
---|
58 | <!--<script type="text/javascript">nodeAdd();</script>-->
|
---|
59 | </div>
|
---|
60 | <div id="infowrapper">
|
---|
61 | <!-- Top information space -->
|
---|
62 | <div id="infotop">
|
---|
63 | <!-- Calling on the node information from an external php file. inc/node_info.php -->
|
---|
64 | <?php node_info_start(); ?>
|
---|
65 | </div>
|
---|
66 |
|
---|
67 | <!-- Bottom information space -->
|
---|
68 | <div id="infobottom">
|
---|
69 | <?php searchNodes(); ?>
|
---|
70 | <div id="searchlist">
|
---|
71 |
|
---|
72 | </div>
|
---|
73 | </div>
|
---|
74 | <!-- The buttons under the searchframe. In a table for positioning. -->
|
---|
75 | <div id="userpick">
|
---|
76 | <table>
|
---|
77 | <tr><!-- onclick events activate functions from within inc/gebruiker_beheerder_switch.js which load in the selected view with node_info.php -->
|
---|
78 | <td><input type="button" value="Gebruiker" onclick="switchGebruiker();"></td>
|
---|
79 | <td><input type="button" value="Beheerder" onclick="switchBeheerder();"></td>
|
---|
80 | </tr>
|
---|
81 | </table>
|
---|
82 | </div>
|
---|
83 | </div>
|
---|
84 |
|
---|
85 | <!-- General functions under the map -->
|
---|
86 | <div id="navigation">
|
---|
87 | <form action="">
|
---|
88 | <table>
|
---|
89 | <tr>
|
---|
90 | <!-- First colum -->
|
---|
91 |
|
---|
92 | <!-- Second colum -->
|
---|
93 | <td>
|
---|
94 | <input type="checkbox" value="showrange" onclick="toggleAllCircles();" >Toon dekking <br>
|
---|
95 | </td>
|
---|
96 | <td>
|
---|
97 | <input type="checkbox" value="showtraffic">Toon dataverkeer
|
---|
98 | </td>
|
---|
99 | <td>
|
---|
100 | <input type="checkbox" value="gsearchbar" onclick="toggleGoogleSearchMap();">Toon locatie zoeken
|
---|
101 | </td>
|
---|
102 | </tr>
|
---|
103 | </table>
|
---|
104 | </form>
|
---|
105 | </div>
|
---|
106 | </div>
|
---|
107 | </body>
|
---|
108 | </html>
|
---|