Updating map centered on when selecting an element

I’m using the google map plugin, and I feel like I’m missing something here. All I want to do is for the map to recenter to the location when I click on a cell in a repeating group.

For Example, on the left, I have three cities, and I want the map to recenter to Spain when I select the last item in the repeating group. And yes, my addresses are stored as a geographical location type.

my center is currently the first item in the list on the left, but I think I need to update this to being the first “selected” or “highlighted” element on the left. but how do I do that?
image

Hi,
you could create a “custom state” on the page (root) level and name it “selectedValue” for example (type: locations).
After that you could set a workflow: onclick current repeating group’s item (or button in the RG), set the custom state to the current clicked location.
If you change the “map centered on” value in the plugin to the custom state, maybe it should work.
(untested!)

best,
jupxi

I’m having a difficult time understanding your implementation or I might be asking for a little bit more hand holding, either way, I think it might work (in theory)
I created a new state with the type Locations. but i’m not sure what to set the default state list and or default state value. and i’m not sure how to set the custom state to the current clicked location.

thanks

OK I solved it. I used the mapbox plugin it works like a charm out of the box. While I love free, some things you just need to pay for.