From 0978834b77ab9ea6534be84c22a3e791baea5003 Mon Sep 17 00:00:00 2001 From: lokal-profil Date: Tue, 24 May 2016 14:23:08 +0200 Subject: [PATCH 1/2] Dropping monument_random and using project instead of assuming wikipedia --- ajaxmonuments.php | 12 +++++++----- wlm-maps.js | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ajaxmonuments.php b/ajaxmonuments.php index 9212ee8..d0e3592 100644 --- a/ajaxmonuments.php +++ b/ajaxmonuments.php @@ -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); @@ -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]); diff --git a/wlm-maps.js b/wlm-maps.js index a18b306..16d8f28 100644 --- a/wlm-maps.js +++ b/wlm-maps.js @@ -289,7 +289,7 @@ function setMarker(feature,latlng) { popuptext = popuptext + ''; if (feature.properties.monument_article) { - popuptext = popuptext + ''; + popuptext = popuptext + ''; }else{ popuptext = popuptext + ''; } From abccf588cba0aea40de3843ec3eece7501c4e428 Mon Sep 17 00:00:00 2001 From: lokal-profil Date: Mon, 24 Jul 2023 08:54:25 +0200 Subject: [PATCH 2/2] Update tile server url pattern Tile server url pattern has changed per openstreetmap/operations#737 --- wlm-maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wlm-maps.js b/wlm-maps.js index 16d8f28..f88e4f9 100644 --- a/wlm-maps.js +++ b/wlm-maps.js @@ -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({
'+feature.properties.name+'
'+feature.properties.name+'
'+feature.properties.name+'