V
V
Vasily Khryagin2019-12-16 23:43:38
Google Maps
Vasily Khryagin, 2019-12-16 23:43:38

How to change marker location on google map?

According to the standard, it is always in the center, but how can I shift it?
center: uluru
Only this code was with the text center

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew Ghostuhin, 2019-12-17
@podkudahka

function initMap() {
  var myLatLng = {lat: -25.363, lng: 131.044};

  var map = new google.maps.Map(document.getElementById('map'), {
    zoom: 4,
    center: myLatLng
  });

  var marker = new google.maps.Marker({
    position: myLatLng,
    map: map,
    title: 'Hello World!'
  });
}

https://developers.google.com/maps/documentation/j...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question