With Voyager you are able to store coordinates and select them from a map.
To do so, you first need to make sure that the column in your table is either GEOMETRY
or POINT
.
After that you have to include the Spatial-Trait in your Model and define the column:
Now you can go to the tables BREAD-settings and set your field to be Coordinates
.
After that you will get a Map where you can select your Coordinates.
Make sure to set the Google Maps API-Key in your configuration. This is also the place where you can define the default location of your map.
You can get the coordinates from your model by calling
This will return an array of coordinates with lat
as the latitude and lng
as the longitude.