# Structuring your database for markers

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:

<figure><img src="https://4212634705-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPwUVbLJRMHVonmvO4xZ8%2Fuploads%2FFLxaPqbrBiXYiXVIPtI2%2FScreenshot%202025-01-10%20at%2013.42.25.png?alt=media&#x26;token=cf1915ff-d20c-4319-b41a-6cd3d308c79d" alt=""><figcaption></figcaption></figure>

There are two ways you can pass values through to the 'Longitudes' and 'Latitudes' fields:

1. Get the values from saved locations in your database
2. 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:

<figure><img src="https://4212634705-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPwUVbLJRMHVonmvO4xZ8%2Fuploads%2FBvWVYSuqBqIjXzIfprfO%2FScreenshot%202025-01-10%20at%2013.46.15.png?alt=media&#x26;token=1fbc3aaf-78d6-4dde-8a43-9c879ace18c3" alt=""><figcaption></figcaption></figure>

*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)

### Video tutorial

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.

{% embed url="<https://www.youtube.com/watch?v=0HWaLb_QuNY>" %}
