Issue
I need to allow the user to pick a single location on a map, but the current option creates a new marker every time they tap the map. I want to re-use the same marker if they pick a new location. I asked for advice and was told to enable the onMarkerCreated event and store the value of the marker as "loc". Then, in the default markers, I can read this value to ensure that it always only has the last marker that was created. It works great!
Resolution
When you enable create marker, you can set the onMarkerCreated event to store the value of the marker that was created as {{storeValue('loc',Map1.selectedMarker)}}
, and then, in the Default markers, you can make it read this value to ensure that it always only has the last marker that was created
[
{{appsmith.store.loc}}
]