> For the complete documentation index, see [llms.txt](https://cranford-tech.gitbook.io/beautiful-maps-mapbox/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cranford-tech.gitbook.io/beautiful-maps-mapbox/loading-markers/structuring-your-database-for-markers.md).

# 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="/files/ND6TBVJtiEzAADhCi4ry" 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="/files/B81povetd7rBaHXF1KzZ" 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>" %}
