New to loopback but having fun setting up my first node based RestAPI. I am able to create models and have the associated tables created in the datastore. My models need to have properties which are data type geojson, a string of the form:
{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [125.6, 10.1] } }
Some are points. Others polylines or polygons. My question is, what is the best way to configure geojson properties in the model schema. I could just set the data type to string I guess but I am hoping there is something more elegant. Ideally I would like to setup custom validation that will check that submitted data is valid geojson. Also I need to be able to query the models by location, e.g. return data within lat/lng bounds.
I choose MYSQL as the datastore for now but only because of past experience. If another data source would be preferable I'll change.
--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/6ae4bc0e-cb20-4f6b-8a7d-26739a195eb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.