Using map marker popup to navigate to views

We are using the map, where we have markers that locate where a unit is located. By clicking on it it opens a popup using the UI popup. It opens up a view like this:

Here we would show some information about the system, and then we have a button to navigate to the RTU’s view, which uses a script to navigate to the correct view. All this works, but when it changes it throws an warning in the logs:
Perspective.ClientSession : Received prop sync for missing view “{The name of the page it navigated away from}”

I looked into this and found out it had something to do with navigating using HTTP and then the gateway loses connection or something to the view and throws this warning cause it didn’t get a shutdown event from the view.
I think i have narrowed it down to this marker popup with a navigation button, since the popup is never closed when navigating and to close a perspective popup you would need an ID for the popup, but inside the marker popup as shown here:

There isn’t an id shown, so I don’t know how i can close the popup successfully before navigating to a new view.

The warning message could just be ignored but it bugs me that it comes up and i would like to find a way to keep the functionality and lose the warning log.

In the script you are using to open the popup you have the option to set the Popup ID.

Set it there and then use it to close the popup on click of the button that opens the other view.

system.perspective.openPopup | Ignition User Manual

The thing is that its not a script or action im doing to open the popup, but its the function inside a map marker where it could open a popup, where it can be given a view path and params for the view. But there isn’t an id name for the popup i can use to close it.
The thing is i could just make a script on each marker to open a popup where i can give it an id, but i would like to still have the visual view, how it kind of points to the marker and moves the map so the hole view of the popup is shown.

I guess i can try and work around this and make it myself, since from what i have seen others have used these markers for is not the same way We do it.

just to give a larger view of how the properties looks like for the map, and how these markers popup is setup:

Ahh now I see you are using the built in popup on the marker and not opening a popup when a marker is clicked. I cannot find a way to script the closing of that type of popup…

I use the on-click of the marker to actually navigate away from the map, so someone else will have to chime in if it is possible to close the marker popup with scripting.