Mapbox from Table Component

Hi everyone,

I'm trying to display points on a Mapbox map component in Retool using latitude and longitude data from a table component. I've configured the Points property to map the latitude and longitude columns from the table, but the points are not appearing on the map.

Here's my setup:

  • Mapbox Component Configuration:
    • Latitude: 42.52
    • Longitude: -70.9
    • Points:

javascript

{{
  table1.data.map(row => ({ latitude: row.LATITUDE, longitude: row.LONGITUDE }))
}}
  • Latitude field name: LATITUDE
  • Longitude field name: LONGITUDE
  • GeoJSON:

json

{
  "type": "FeatureCollection",
  "features": []
}
  • Table Component Data:
    • LATITUDE and LONGITUDE columns are present and populated with valid data.

I've attached a screenshot of my configuration and the data from the table component. Can someone help me understand why the points are not showing up on the map?

Thanks in advance!

Hii @Ryan_Nicholas ,

I have successfully utilized the Mapbox component with the table, and everything is functioning perfectly. Below is a screenshot of my Mapbox map integrated with the table component.
Please verify the table data and its source.

Very strange.... Looks the same. My array is populating with lat longs, that is confirmed.

Hello!

It looks like in the setup you need to pick the field names exactly as you've mapped them. In your case, you seem to have capitalized these field names but in your mapping for the Points data you used lower case properties. If you either capitalize the property names in your mapping or lower case the Latitude/Longitude field names in your MapBox setup I think your points will render.

1 Like

that did the trick, thanks!

2 Likes