Link a view to a map component marker

I am making a view with the map component and I have added some markers on the map, when I link them so that when I click on them they each go to a different page, they all go to the same page. I have used a script inside the configure events in the component map. Does anyone know how I can do it?

You'll need to share your script, as well as provide some clarification on what Event the script is attached to.

This is the script:
def runAction(self, event):
system.perspective.navigate(view="Pantallas/Planta_1")

You're mixing terms here, and you'll need to provide some clarification before we can help you any further.

What exactly do you want to happen when you click a marker?

I ask because you mention

yet you've supplied a script which does View navigation. View navigation will not change your URL - it will only swap out the primary View in use for whatever you supply for the view kwarg.

Your original request also requested help in getting your marks to go to different pages (or Views), but your supplied script is hard-coded to go to the Pantallas/Planta_1 View. Do you need to go to different Views, or do you need to go to that View while passing it parameters based on the marker that was clicked?

You didn't answer this question. I'm going to assume this is in the onMekerClick Event. To make deterministic changes based on the clicked marker you'll need to reference event.name

if event.name == "SomeMarkerName":
    # do something

or

system.perspective.navigate(view="Pantallas/Planta_1", params={"name": event.name}

I have solved the problem I had with your solution, thank you!

That's great! So what was the problem? Part of being a user on these forums is sharing solutions and why that solution worked.

The problem I had is that I have a map with five markers, all 5 went to the same page when I clicked on them, but with the script provided:
if event.name == "name.marker" :
I have already made each marler go to one different view when you press it