Hey Patrick,
In this particular instance I need to create a marker for my map and then place it on the map. I’m using leaflet as I don’t want to use Google maps (which are insanely expensive now!).
I have this working in a standalone app that I wrote using php/mysql for the data and already have all the scripts written from that. I just boiled it down to the simplest example to figure out how to get the lat/lng variable from the repeater.
I just tried …
<div class="row" is="dmx-repeat" id="repeat1" dmx-bind:repeat="sc_tripbits.data.all_tripbits" dmx-on:updated="mapMarker({{sc_tripbits.data.all_tripbits[$index].lat}})">
with the function outside the repeater at the end of my code with the rest of the javascript functions
function mapMarker(lat){console.log("LAT:" + lat);}
it returns “Lat: undefined”
So the problem is still, how to get a value from the repeater into javascript.
Maybe if you, or someone else, has a few minutes you could mock it up and see if you can get a value from a repeater into a script? I’m starting to think it might be a backend issue with Wappler, rather than a syntax issue on my end.
Thanks