V
V
Vasily Khryagin2019-12-18 16:13:27
JavaScript
Vasily Khryagin, 2019-12-18 16:13:27

How to change the value of a variable in google map on mobile screen?

I want to change the value of posCenter on mobile screens. How to do it?

function initMap() {
    // Styles a map in night mode.
    var posCenter = {lat: 59.964556, lng: 30.276000}
    var uluru = {lat: 59.964556, lng: 30.280207};
    var map = new google.maps.Map(document.getElementById('map'), {
    center: posCenter,
    zoom: 16,
    
    });
    var marker = new google.maps.Marker({
    position: uluru,
    map: map,
    icon: '<?php bloginfo('template_directory') ?>/img/marker.png'
    });
    }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question