'Feature', 'id' => $station['id'], 'properties' => array( 'name' => $station['title'], ), 'geometry' => array( 'type' => 'Point', 'coordinates' => $coordinate ) ); } } // Add lines between points if($hasgroup) { $features[] = array( 'type' => 'Feature', 'name' => 'Line', 'geometry' => array( 'type' => 'LineString', 'coordinates' => $coordinates ) ); } ?> 'FeatureCollection', 'features' => $features ))?>