I've got a geoJSON file consisting of:
{
"type": "FeautureCollection",
"features": [
{
"type": "Feature",
"id": "1",
"geometry": {
"type": "Point",
"coordinates": [
5.709531,
50.855802
]
}
},
{
"type": "Feature",
"id": "2",
"geometry": {
"type": "Point",
"coordinates": [
5.709426,
50.855798
]
}
}
]
}
This JSON file is constructed in a php script:
$ret = array();
$ret['type'] = "FeautureCollection";
$ret['features'] = array();
$f = array();
$f['type'] = 'Feature';
$f['id'] = $p['id'];
$f['geometry'] = array();
$f['geometry']['type'] = 'Point';
$f['geometry']['coordinates'] = array(floatval($p['lat']), floatval($p['lon']));
$ret['features'][] = $f;
echo json_encode($ret);
When i try to load it through the polymaps.org framework none of the points are displayed. besides the standard stuff to load the map I use this javascript to parse the geoJSON.
map.add(po.geoJson()
.url('geojson/c.geo.php')
.id('test')
);
The CSS is the following, so that the points should look like a red-circle:
#test {
fill: lightcoral;
fill-opacity: .5;
stroke: brown;
}
The strange thing is, that when I alter the geojson file pointer to one constructed by a GIS application it works. So I bet my geoJSON is corrupted. But when I run it through http://jsonlint.com/ it validates.
Does anybody know how this is possible?