Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions ajaxmonuments.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@
if ($withImages == '1'){
$imageCondition = "image != ''";
}
$sql="SELECT country, lang, id, name, lat, lon, municipality, address, image, commonscat, monument_article, monument_random, source " .
"FROM monuments_all " .
"WHERE lon>=:left AND lon<=:right AND lat>=:bottom AND lat<=:top AND " . $imageCondition . " " .
"ORDER BY monument_random " .
"LIMIT " . $limit;
$sql = "SELECT country, lang, id, name, lat, lon, image, commonscat, " .
"monument_article, municipality, address, source, project " .
"FROM monuments_all " .
"WHERE lon>=:left AND lon<=:right AND lat>=:bottom AND lat<=:top " .
"AND " . $imageCondition . " " .
"LIMIT " . $limit;
$stmt = $db->prepare($sql);
$stmt->bindParam(':left', $left, PDO::PARAM_STR);
$stmt->bindParam(':right', $right, PDO::PARAM_STR);
Expand Down Expand Up @@ -107,6 +108,7 @@
$prop['municipality']=$row['municipality'];
$prop['address']=$row['address'];
$prop['lang']=$row['lang'];
$prop['project']=$row['project'];
$prop['id']=$row['id'];
$prop['name']=explode('|', $row['name']);
$prop['name']=str_replace(array('[', ']'), '', $prop['name'][0]);
Expand Down
4 changes: 2 additions & 2 deletions wlm-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function getwebsite (country) {
}

function init() {
var osmUrl='//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmUrl='//tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib=translatemsg('osm-attrib');

withimageicon=L.icon({
Expand Down Expand Up @@ -289,7 +289,7 @@ function setMarker(feature,latlng) {
popuptext = popuptext + '<table border=0 width=350px>';
if (feature.properties.monument_article)
{
popuptext = popuptext + '<tr><td colspan=3><strong><a href="//'+feature.properties.lang+'.wikipedia.org/wiki/'+feature.properties.monument_article+'" target="_blank">'+feature.properties.name+'</a></strong></td></tr>';
popuptext = popuptext + '<tr><td colspan=3><strong><a href="//'+feature.properties.lang+'.'+feature.properties.project+'.org/wiki/'+feature.properties.monument_article+'" target="_blank">'+feature.properties.name+'</a></strong></td></tr>';
}else{
popuptext = popuptext + '<tr><td colspan=3><strong>'+feature.properties.name+'</strong></td></tr>';
}
Expand Down