Structuring your database for markers
Last updated
Last updated
You will need valid latitude and longitude coordinates for each location you want to add a marker for. You will use these coordinates in the 'Longitudes' and 'Latitudes' fields in the 'Add List of Markers' or 'Add Single Marker' action:
There are two ways you can pass values through to the 'Longitudes' and 'Latitudes' fields:
Get the values from saved locations in your database
Get the values from an external API (like Google Places)
If you're getting the values from your database, you can create a data type called 'location' and add a longitude and latitude field to it. Check out the custom data type we created for the plugin demo app below:
Please note that not all the fields in the above 'Location' data type are required, but the 'Latitude' and 'Longitude' fields are.
You can add locations to your database by:
Uploading a csv file
Adding locations from your app (or letting users do this)
You can watch the below video tutorial to see an example of how to setup your database and allow users to add locations. The relevant section is from 04:02 to 16:54.