Changeset 195 for trunk/npemap.org.uk
- Timestamp:
- Oct 26, 2006, 10:32:50 PM (14 years ago)
- Location:
- trunk/npemap.org.uk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/npemap.org.uk/cgi/get-postcodes.fcgi
r169 r195 73 73 } 74 74 75 my $sth = $dbh->prepare("SELECT outward || ' ' || inward AS postcode, easting, northing,id FROM postcodes WHERE easting BETWEEN ? AND ? AND northing BETWEEN ? AND ? AND NOT deleted");75 my $sth = $dbh->prepare("SELECT outward || ' ' || inward AS postcode, easting, northing,id,source FROM postcodes WHERE easting BETWEEN ? AND ? AND northing BETWEEN ? AND ? AND NOT deleted"); 76 76 77 77 if ($sth->execute($cgi->param('mineasting'), $cgi->param('maxeasting'), $cgi->param('minnorthing'), $cgi->param('maxnorthing'))) { … … 81 81 foreach my $key (keys %$hr) { 82 82 my $hash = $$hr{$key}; 83 print "addMarker('$$hash{postcode}', $$hash{easting}, $$hash{northing}, $$hash{id});\n";83 print "addMarker('$$hash{postcode}', $$hash{easting}, $$hash{northing}, [$$hash{id}, $$hash{source}]);\n"; 84 84 } 85 85 print "completeMarkers();\n"; -
trunk/npemap.org.uk/static/tiles/mapTiles.js
r192 r195 336 336 } 337 337 338 function addMarker(postcode, easting, northing, id) { 338 var markerColours = new Array(1); 339 markerColours[0] = "../images/green-marker.gif"; 340 markerColours[1] = "../images/blue-marker.gif"; 341 342 343 function addMarker(postcode, easting, northing, others ) { 344 // Others is an array for us to put extra stuff in 345 339 346 var newMarker; 347 var id = others[0]; 348 var source = others[1]; 349 340 350 if (nextMarker < markers.length) { 341 351 newMarker = markers[nextMarker]; 342 352 var img=newMarker.firstChild; 343 353 img.title = postcode; 354 img.src = markerColours[source]; 344 355 newMarker.style.visibility = 'visible'; 345 356 } … … 348 359 var img=document.createElement('img'); 349 360 img.title = postcode; 350 img.src = "../images/green-marker.gif";361 img.src = markerColours[source]; 351 362 newMarker.appendChild(img); 352 363 newMarker.style.position = 'absolute';
Note: See TracChangeset
for help on using the changeset viewer.