It is hard to find out GeoJSON in MongoDb C# Driver.
I try to create a document like this:
new BsonDocument()
{
{ "PointType", "Building"},
{ "Name", "My Place"},
{ "Location", ??? }
}
and try to fill in something like GeoJson.Point(new GeoJson2DCoordinates(0.0000, 0.0000)).ToBsonDocument()
in the ???
above.
but once I create index for the Location
and try to insert this document, MongoDb wan't happy. It throws location object expected, location array not in correct format
.
Is there any sample or documentation for C# with BsonDocument
and GeoJSON?
Any other suggestion to insert GeoJSON value?