Attach map marker to a thing

Hi. I am trying to build a map that populates clickable markers representing user submitted stories, much like this visual example.

I am using the Mapbox Plugin which can populate the markers on a map as long as you are pointed at the right type and source. Example shown from documentation:

However, I am not sure how to set up this source in the database. I tried adding a “marker” field to my story data type, but I don’t see how you can link it to the story’s unique id. Then I thought maybe I need to create a new data type that is just markers, and have each marker thing be linked to each story’s unique id, but did not see how to do that either.

My current setup is based on the story as a source approach.


Thoughts on how I can populate the markers? Am I even close? @ZeroqodeSupport

You need to store the geographic address of the location, so need a data field that is of type geographic address…you do not need a separate data type called markers.

On your data type of stories add a field for the geographic address.

On the map element Markers source is Do a search for Stories, each items geographic address…latitude field is Do a search for stories each items geographic address extract latitude and do the same for the longitude field.

Hello @dm8668 ,
Thank you for reaching out. :slightly_smiling_face:

In addition to @boston85719 insights, we wanted to add that based on your current setup where you already have latitude and longitude fields in your Story data type, you can utilize these directly. You can achieve this by using the “Do a search for stories” method in your markers source field to dynamically source the data.

Additionally, it would be beneficial to add a geographic address field to your Story data type.


This would not only enhance the data accuracy but also provide clearer location context when you’re implementing the “Add marker” action.

Hope this was helpful. :pray:
Best regards, :dizzy:
Zeroqode Support Team.

@dm8668 I would suggest removing from your Stories data type the data fields of longitude and latitude and just have the single field of geographic address…this is because, for one, the geographic address already stores the latitude and longitude, and second, in respect of WUs, the ‘lighter’ your data type is (ie: the less data fields) the better in terms of WU costs as we are charged WUs for every character of data returned in search results, and having the extra fields of longitude and latitude will just add on each story in the database, two fields with characters that are not necessary, thus costing more in regards to WUs than needed.

Additionally, having the single field of geographic address would likely be considered more reliable in terms of data integrity as you will only ever need to remember when developing to save just the single field of geographic address as it can be easy to lose track of all the data fields on a data type, so leads to a chance that somebody may forget to also set the latitude and longitude field values.

Thank you so much for the detailed responses! I have additional issues/ questions, but first, here is what it looks like now with my changes:

  1. I don’t seem to have the option to “extract” each items latitude and longitude. It only gives me the options shown below so I’ve kept the separate fields for now.
  2. It required an entry for “icon size.” I assumed this is the size in pixels of the icon but it wants a list from dynamic entry. No idea what this means and the documentation doesn’t really explain. I created a field for marker size in my story data type and set the default at .5. Not sure if that is correct.
  3. The markers still aren’t populating. Not sure if it is because of the two Google API issues also shown below?? Do I need a google API in addition to the Mapbox API I already have?



Screen Shot 2024-04-18 at 9.02.03 AM

@ZeroqodeSupport following up on this

You are correct, in the operator of extract there is no option for latitude or longitude, but you should still be able to use the single field of geographic address as the lat/lng are basically attached to it, so when structuring the dynamic expression, after you have the geographic address field, do not use the operator extract, but you do need to click the ‘more’ text button, and then reference each items lat or lng

Screen Shot 2024-04-19 at 11.08.50 PM

Awesome, thank you! I was clicking on the lat/long fields I had created instead. :upside_down_face: Any chance you know how to set up the icon size? It’s asking for a dynamic list of numbers. I just want all the markers that populate at once to be the same size.

I don’t

Is there any reason you do not use the static marker for all locations?

I’ve added the static marker but it is still asking for the icon size…

@ZeroqodeSupport can you clarify?

Hello @dm8668 ,
We hope you are doing well.

It required an entry for “icon size.” I assumed this is the size in pixels of the icon but it wants a list from dynamic entry. No idea what this means and the documentation doesn’t really explain. I created a field for marker size in my story data type and set the default at .5. I’ve added the static marker but it is still asking for the icon size…

Kindly note that the last update introduced a default icon size in the code itself, if the icon size field is left empty, the plugin will automatically apply a default icon that is “1” This is
input an integer number to represent the scaling percentage (e.g., 1 for 100%, 0.2 for 20%, 1.5 for 150%).

That means that by default it will show on the map as big as the image size. This means that the icon will display at 100% of its uploaded dimensions.

Find our Demo page where we have an example of how this feature is working.

There is no field for the default icon list size so as you can see the plugin takes the dimensions of the image itself.

You can manually adjust the scaling percentage from the DB.

It’s best to resize your images beforehand. Here’s a handy tool to help you resize images easily: Image Resizer. You can adjust these values as you see fit they represent only an approximative size.

  • For a large icon, resize your image to 50x50 pixels.
  • For a medium icon, 32x32 pixels is optimal.
  • For a small icon, 16x16 pixels will be sufficient.

Additionally, using smaller icons can be beneficial as it consumes fewer Workload units, making your application more efficient.

Hope this was helpful. Let me know if you have any additional questions.
Have a nice day! :dizzy:
Zeroqode Support Team.

Hello @dm8668 ,
We hope you are doing well. :slightly_smiling_face:

We would like to know if you received my previous message.

Did you have time to check the suggestions we made, or did you fix the reported issue by yourself?

If the plugin is now functioning well and you don’t have any other issues, we would be grateful if you could take a moment to share your experience with Zeroqode at: Review.

Alternatively, you can leave a review by going to the Plugins tab in the Bubble editor and giving it as many stars as it deserves.

Your feedback would make our day at the Support team and motivate us to continue developing outstanding products and maintaining excellent customer service. :blush:

If you have any additional questions, please don’t hesitate to contact us.
Have a nice day! :sunny:
Zeroqode Support Team.

Yes, I marked it as the solution. Thank you!