I'm really loving that RethinkDB has Geospatial out of the box.
My only issue I'm having is with adding Polygons.
The docs (https://www.rethinkdb.com/api/javascript/polygon/) says I can only insert my points as arguments. This is completely unrealistic and unusable because I don't know how many vertices my user will decide on their polygon. It would be great if I could throw it an array of vertices but I get the error:
Unhandled rejection ReqlDriverError:
r.polygon
takes at least 3 arguments, 1 provided.
The only thing I can think of doing is making 16 separate functions that take in the specified amount of vertices in an array.
Any ideas what I can do? Thank you!