D
D
Dmitry2017-07-21 18:02:15
JavaScript
Dmitry, 2017-07-21 18:02:15

How to click on the google map marker to go to the map in a new tab?

How to click on the google map marker to go to the map in a new tab?
Connected map using iframe

<iframe src="https://www.google.com/maps/d/embed?mid=1SWMbeb6WpUUMXqkxFG_3fKRe1DM&hl=ru" width="100%" height="480"></iframe>

By clicking on the marker, a window opens inside the map with coordinates. How can I make the map open in a new tab when clicking on the marker?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Rostanets, 2017-07-24
@ddimonn8080

iframe'om cannot be steered in any way. You need to connect via JavaScript SDK
Click here

function addMarker(marker) {
            var marker = new google.maps.Marker({
                position: marker.position,
                icon: icons[marker.type].icon,
                map: map,
                content: marker.content
            });

            marker.addListener('click', function() { });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question