-
Notifications
You must be signed in to change notification settings - Fork 0
/
landmark_toursmap.old.php
157 lines (131 loc) · 4.28 KB
/
landmark_toursmap.old.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome To Edmonton Historical Board</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>Edmonton Historical Board: Neighbourhood Map</title>
<!-- online key
-->
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAr-VkLAVeby8KYZyn0ivvehSWkCJnp-ZkYp3eaq1ccwkzROXybBQ4j3xdpq-C6hciAMOIq_DPfyHO9A" type="text/javascript"></script>
<!-- local key
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA" type="text/javascript"></script> -->
<script type="text/javascript">
var mapContainer=null;
var mapLng = -113.490833;
var mapLat = 53.541944;
var mapZoom = 3;
var locationsXml = 'locations.php';
function getNeighbourhood(id){
//alert(id);
locationsXml = 'locations.php?fkneighbor_id='+id ;
//alert(locationsXml);
init();
loadMap();
}
function init() {
mapContainer = document.getElementById("map");
loadMap();
}
function createInfoMarker(point,theaddy)
{
var marker = new GMarker(point);
GEvent.addListener(marker, "click",function () {marker.openInfoWindowHtml(theaddy); });
return marker;
}
function loadMap()
{
var map = new GMap(mapContainer);
map.addControl(new GMapTypeControl());
map.addControl(new GLargeMapControl());
map.centerAndZoom(new GPoint(mapLng,mapLat),mapZoom);
var request = GXmlHttp.create();
request.open("POST",locationsXml,true);
request.onreadystatechange= function(){
if (request.readyState==4){
var xmlDoc = request.responseXML;
var markers = xmlDoc.documentElement.getElementsByTagName("marker");
for(var i=0;i< markers.length; i++){
var point = new GPoint(parseFloat(markers[i].getAttribute("longitude")),
parseFloat(markers[i].getAttribute("latitude")));
var theaddy = '<div class="location"><strong>'
+ markers[i].getAttribute('locname')
+ '</strong><br />';
theaddy +=markers[i].getAttribute('address') + '<br />';
theaddy +=markers[i].getAttribute('city') + ', ';
theaddy +=markers[i].getAttribute('province') + ' <br />';
theaddy += '</div>';
var marker = createInfoMarker(point,theaddy);
map.addOverlay(marker);
}
}
}
request.send('a');
}
</script>
</head>
<body onload="init()">
<div id="header">
<div id="logo">
</div>
<ul id="topmenu">
<li><a href="index.html">Home</a></li>
<li><a href="Plaques.html">Plaques</a></li>
<li><a href="awards.html">Awards</a></li>
<li class="current"><a href="Landmarks.html">Landmark</a></li>
<li><a href="about_us.html">About Us</a></li>
<li><a href="contact_us.html">Contact Us</a></li>
</ul>
</div>
<div id="contents">
<h1>Edmonton Historical Board's Catalogue of Landmarks</h1>
<strong>Historical Landmarks Map Zone</strong>
<?php
require_once('admin/projectClasses/controller.php');
?>
<form action="" method="post">
<table>
<tr>
<td>Neighbourhood: <br />
<?php displayNeighbourhood(); ?>
</td>
<td>Location:<br />
<input name="location" type="text" value=""></td>
<td>Keyword:<br />
<input name="keyword_text" type="text" value=""></td>
<td><br /><input class="btton" type="submit" id="list_submit" value="View Listing"></td>
</tr>
</table>
</form>
<p>Your Landmark Map search for <?php echo $_GET['fkneighbor_id']; ?> is below:</p>
<div id="map" style="width: 500px; height: 400px"></div>
</div>
<ul id="menu">
<li><a href="landmark_search.php">Search Landmarks </a></li>
</ul>
<div id="footer">
Copyright 2009
</a></div>
</body>
</html>
<?php
/* ------------------------------------------- Display Neighbourhood ------------------------------------------*/
function displayNeighbourhood()
{
$m_landmark = new controllerClass();
$results=$m_landmark->getAllNeighbourhoods();
?>
<select name="fkneighbor_id">
<option>Choose a Neighbourhood...</option>
<?php
while($row=mysql_fetch_array($results))
{
?>
<option value="<?php echo $row['id']; ?>"><?php echo $row['name']; ?></option>
<?php
}
?>
</select>
<?php
}
?>