From: Philipp Spitzer Date: Thu, 24 May 2018 21:17:10 +0000 (+0200) Subject: GeoJSON requires type Feature with capital F. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/mediawiki_extensions/wrmap.git/commitdiff_plain/aa121bbf65e938c727b2b4585872bf56fbd5d27f?hp=c1b0b70f898066844f22072c4a8cb0a0a6c0a89a GeoJSON requires type Feature with capital F. --- 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)