I want to display the city boundary on the Google Map using GeoJSON data which I get using the following tools.
- I went to the nominatim.openstreetmap.org and search for a city (Denver for example)
- With the retrieved OSM ID (in this case : 253750) then I've generated the GeoJSON file using the online tool (polygons.openstreetmap.fr) - which looks like this http://polygons.openstreetmap.fr/get_geojson.py?id=253750¶ms=0
After that, I've downloaded the file and tried to load this GeoJSON data into my map using simple:
map.data.loadGeoJson(
'http://domain.com/example.json');
But, in my console I got an error:
Uncaught InvalidValueError: not a Feature or FeatureCollection
The problem is that even though the above tool generates GeoJSON format, it's not recognized as the standard one. So is there an extra step between or I'm missing something here?