I have a lightning-map
component in my LWC component.
I hide the list of markers as I do not like what the component has and provide my own.
If user clicks on a marker in the map, I can handle and scroll my list appopriately through onmarkerselect
.
However, there does not seem to be a way to programmatically select a marker. Setting selected-marker-value={currentMarkerValue}
has no effected on the map. To be precise, the expectation is that the info window (gmaps term) aka the little bubble pop up should show up.
Update This is specifically when map is declared with list-view="hidden"
attribute
markerselect
event is the last one in this chain. The sole purpose ofmarkerselect
event seems to be able to fetch the selected marker value and use it. Since, you can't programmatically hack into the shadow DOM, you can't get the marker GUIDs and invoke the specific click event. The click event in your custom list implementation bypasses all the internal events and hence, no pop-up.