[7767] | 1 | <?php
|
---|
| 2 | require_once("../config.php");
|
---|
[7805] | 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");
|
---|
[7725] | 6 |
|
---|
[7769] | 7 | #getting array from kmlHandler
|
---|
[7784] | 8 | $markers = get_node_array($config['kml_file']);
|
---|
[7767] | 9 |
|
---|
[7725] | 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 |
|
---|
[7828] | 21 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
---|
| 22 | <html lang="dutch">
|
---|
[7725] | 23 | <head>
|
---|
[7828] | 24 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
---|
[7725] | 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 |
|
---|
[7731] | 33 | <!-- Make our $marker[] array from kmlHandler available to javascript in JSON (No idea on how to this another less ugle way)-->
|
---|
[7805] | 34 | <script type="text/javascript">
|
---|
[7725] | 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>
|
---|
[7731] | 40 | <!-- Loading in the markerClusterer that will handle the clustering of markers. -->
|
---|
| 41 | <script type="text/javascript" src="inc/markerClusterer.js"></script>
|
---|
[7725] | 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>
|
---|
[7779] | 45 | <script type="text/javascript" src="inc/iconStyles.js"></script>
|
---|
[7725] | 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>
|
---|
[7805] | 49 |
|
---|
[7725] | 50 | </head>
|
---|
[7826] | 51 | <body onload="suggestMarkers('')">
|
---|
[7725] | 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 -->
|
---|
[7828] | 57 | <script type="text/javascript">initialize_map();</script>
|
---|
[7725] | 58 | <!--<script type="text/javascript">nodeAdd();</script>-->
|
---|
| 59 | </div>
|
---|
| 60 | <div id="infowrapper">
|
---|
| 61 | <!-- Top information space -->
|
---|
| 62 | <div id="infotop">
|
---|
[7756] | 63 | <!-- Calling on the node information from an external php file. inc/node_info.php -->
|
---|
[7769] | 64 | <?php node_info_start(); ?>
|
---|
[7756] | 65 | </div>
|
---|
[7725] | 66 |
|
---|
| 67 | <!-- Bottom information space -->
|
---|
| 68 | <div id="infobottom">
|
---|
[7805] | 69 | <?php searchNodes(); ?>
|
---|
[7725] | 70 | <div id="searchlist">
|
---|
[7805] | 71 |
|
---|
[7725] | 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">
|
---|
[7828] | 87 | <form action="">
|
---|
[7725] | 88 | <table>
|
---|
| 89 | <tr>
|
---|
| 90 | <!-- First colum -->
|
---|
| 91 | <td>
|
---|
[7809] | 92 | <input type="checkbox" value="shownodes" onclick="toggleAllNodes();" checked="checked">Toon nodes
|
---|
[7725] | 93 | </td>
|
---|
| 94 | <!-- Second colum -->
|
---|
| 95 | <td>
|
---|
[7828] | 96 | <input type="checkbox" value="showrange">Toon dekking <br>
|
---|
[7725] | 97 | <input type="checkbox" value="showtraffic">Toon dataverkeer
|
---|
| 98 | </td>
|
---|
[7802] | 99 | <td>
|
---|
| 100 | <input type="checkbox" value="gsearchbar" onclick="toggleGoogleSearchMap();">Toon locatie zoeken
|
---|
| 101 | </td>
|
---|
[7725] | 102 | </tr>
|
---|
| 103 | </table>
|
---|
| 104 | </form>
|
---|
| 105 | </div>
|
---|
| 106 | </div>
|
---|
| 107 | </body>
|
---|
| 108 | </html>
|
---|