The first thing I notice is that it doesn't look like you're calling
openPopup correctly. You need to pass a LatLng object and not two separate values openPopup(<
LatLng>
latlng?).
As for opening a specific marker, you need to store all of the marker objects or markerRefs somewhere, then find the correct item, and finally call openPopup.