From aa121bbf65e938c727b2b4585872bf56fbd5d27f Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Thu, 24 May 2018 23:17:10 +0200 Subject: [PATCH] GeoJSON requires type Feature with capital F. --- wrmap.body.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrmap.body.php b/wrmap.body.php index 97a8774..c2499d9 100644 --- a/wrmap.body.php +++ b/wrmap.body.php @@ -287,7 +287,7 @@ class WrBaseMap { $image_url = WrBaseMap::wikipage_to_image($title, 150); if (!is_null($image_url)) $properties['thumb_url'] = $image_url; $json_feature = array( - 'type' => 'feature', + 'type' => 'Feature', 'geometry' => array( 'type' => 'Point', 'coordinates' => array($lon, $lat) @@ -343,7 +343,7 @@ class WrBaseMap { $coordinates = WrBaseMap::geo_to_coordinates($feature); if (count($coordinates) != 1) throw new Exception(wfMessage('wrmap-error-coordinate-count', $feature->getName())->text()); $json_feature = array( - 'type' => 'feature', + 'type' => 'Feature', 'geometry' => array( 'type' => 'Point', 'coordinates' => reset($coordinates) @@ -371,7 +371,7 @@ class WrBaseMap { $properties['strokeWidth'] = $stroke_width; } $json_feature = array( - 'type' => 'feature', + 'type' => 'Feature', 'geometry' => array( 'type' => 'LineString', 'coordinates' => WrBaseMap::geo_to_coordinates($feature) -- 2.39.5