I keep getting message: "Invalid GeoJSON"
errors when trying to add a polygon to a static map on mapbox api.
On the following map:
My LineString example works to outline the border of the polygon I wish to draw:
geojson({"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-120.8492,39.4916],[-120.8474,39.4896],[-120.8510,39.4864],[-120.8492,39.4916]]}})
If try to turn it into a polygon using the following geojson object:
geojson({"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[-120.8492,39.4916],[-120.8474,39.4896],[-120.8510,39.4864],[-120.8492,39.4916]]}})
It blows up:
Can anybody see what I am doing wrong? I'm having problems finding any examples of using the static api to draw polygons but the static api doc says that this is possible.
Thanks.