How do I create a map marker?

I went ahead and put the map component. Everything works well in preview mode. I just don’t know the syntax for that “Marker Field” Would love a few examples if someone can you help on this.

Thank you in advance!

Hey Art, great question!
The syntax for the markers are:

{ 
  latitude: some number here, 
  longitude: some number here,
  title: "optional value",
  description: "optional value
}

I’ve been testing that component and notice an issue with the array input. I have added it to our tasks to fix. For the mean time, you’ll have to add the markers outside of the builder.
To do that:

  • open the screenWhereTheComponentExists.js in the code editor of you choice
  • find the MapSimple component
  • after the <MapSimple part add a new line by hitting enter and add the following line
    markers=[ *markers go here *]

Make sure each marker is wrapped in its own curly braces {} and that the optional values are wrapped in a " . The longitude and latitude should not be wrapped in ".

Let me know if you run into any issues!

2 Likes

Hey following up on this!
The input to add Markers directly in the builder has been added.
You no longer need to add markers outside of the builder, unless there’s a custom function you would like to use.

1 Like

This makes sense, I’ll give it a shot. Thank you!