GeoJSON requires type Feature with capital F.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 24 May 2018 21:17:10 +0000 (23:17 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 24 May 2018 21:17:10 +0000 (23:17 +0200)
wrmap.body.php

index 97a8774470f2cdefda4904bbfcebcf50f41d1ea2..c2499d94bf1a385d632d1dc4c2d42ed55365d9d3 100644 (file)
@@ -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)