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

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

Comitted some images I forgot to upload. Searchlist now shows nodes, and filters on name automatically while typing. Next up is getting it to filter on locations of nodes too.

  • Property svn:eol-style set to native
File size: 3.7 KB
Line 
1<?php
2require_once("../config.php");
3require_once($config['root']."/map/inc/kmlHandler.php");
4require_once($config['root']."/map/inc/node_info_start.php");
5require_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));
16if (array_key_exists($servername,$config['googlekey'])) {
17 $apikey = $config['googlekey'][$servername];
18}
19?>
20
21<html>
22<head>
23<title>Nodemap Wireless Leiden</title>
24<!-- External stylesheet for all browsers -->
25<link href="style/stylesheet.css" rel="stylesheet" type="text/css">
26<!-- Using stylesheet2.css when browser is any version of Microsoft Internet Explorer -->
27<!--[if IE]>
28 <link href="style/stylesheet2.css" rel="stylesheet" type="text/css">
29<![endif]-->
30
31<!-- Make our $marker[] array from kmlHandler available to javascript in JSON (No idea on how to this another less ugle way)-->
32<script type="text/javascript">
33var markers = <?php echo json_encode($markers); ?>;
34</script>
35
36<!-- Loading in the google-api -->
37<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php print $apikey;?>" type="text/javascript"></script>
38<!-- Loading in the markerClusterer that will handle the clustering of markers. -->
39<script type="text/javascript" src="inc/markerClusterer.js"></script>
40<!-- Loading in the javascript that will add the map into #mapcanvas -->
41<script type="text/javascript" src="inc/nodemapWL.js"></script>
42<script type="text/javascript" src="inc/overlay.js"></script>
43<script type="text/javascript" src="inc/iconStyles.js"></script>
44
45<!-- Loading in the javascript that handles the switching between gebruiker and beheerder -->
46<script type="text/javascript" src="inc/gebruiker_beheerder_switch.js"></script>
47
48</head>
49<body>
50<!-- Mainwrapper contains all content on the page -->
51<div id="mainwrapper">
52 <!-- Mapcanvas is the container where the map will be put in. Height and width of map is specified by size of the div -->
53 <div id="mapcanvas">
54 <!-- Create the map using the intitialize_map() function from nodemapWL.js -->
55 <script type="text/javascript">initialize_map();</script>
56 <!--<script type="text/javascript">nodeAdd();</script>-->
57 </div>
58 <div id="infowrapper">
59 <!-- Top information space -->
60 <div id="infotop">
61 <!-- Calling on the node information from an external php file. inc/node_info.php -->
62 <?php node_info_start(); ?>
63 </div>
64
65 <!-- Bottom information space -->
66 <div id="infobottom">
67 <?php searchNodes(); ?>
68 <div id="searchlist">
69
70 </div>
71 </div>
72 <!-- The buttons under the searchframe. In a table for positioning. -->
73 <div id="userpick">
74 <table>
75 <tr><!-- onclick events activate functions from within inc/gebruiker_beheerder_switch.js which load in the selected view with node_info.php -->
76 <td><input type="button" value="Gebruiker" onclick="switchGebruiker();"></td>
77 <td><input type="button" value="Beheerder" onclick="switchBeheerder();"></td>
78 </tr>
79 </table>
80 </div>
81 </div>
82
83 <!-- General functions under the map -->
84 <div id="navigation">
85 <form>
86 <table>
87 <tr>
88 <!-- First colum -->
89 <td>
90 <input type="checkbox" value="shownodes" onclick="toggleMyKml();" checked="checked">Toon nodes
91 </td>
92 <!-- Second colum -->
93 <td>
94 <input type="checkbox" value="showrange">Toon dekking <br/>
95 <input type="checkbox" value="showtraffic">Toon dataverkeer
96 </td>
97 <td>
98 <input type="checkbox" value="gsearchbar" onclick="toggleGoogleSearchMap();">Toon locatie zoeken
99 </td>
100 </tr>
101 </table>
102 </form>
103 </div>
104</div>
105</body>
106</html>
Note: See TracBrowser for help on using the repository browser.