lng, $c->lat]; } $features[] = [ "type" => "Feature", "geometry" => [ "type" => "LineString", "coordinates" => $formatted_coords ], "properties" => [ "id" => $row['id'], "nama" => $row['nama_jalan'], "status" => $row['status_jalan'], "panjang" => $row['panjang_jalan'] ] ]; } $geojson = ["type" => "FeatureCollection", "features" => $features]; echo json_encode($geojson); ?>