I was using Leaflet so far, now I'm using Google Map (100% width of the screen).
I have a marker that was positionned in the center of the map. How can I shift the map so that the marker is shown at 75% of the screen ?
Basicaly, I want to switch from this display
<---screen width-->
___________________
| |
| x |
|_________________|
To that
<---screen width-->
___________________
| |
| x |
|_________________|
This is how I place my marker now :
function updateMarkerPosition(marker) {
const lat = marker.getPosition().lat();
const long = marker.getPosition().lng();
const newLatlng = new google.maps.LatLng(lat, long);
marker.setPosition(newLatlng);
map.setCenter(newLatlng); //will logicaly be deleted ?
map.panTo(newLatlng) //no sure about this
map.setZoom(15);
//placing with leaflet
const offset = e.popup._container.clientWidth - e.popup._container.clientWidth / (window.innerWidth >= 767 ? window.innerWidth : 1);
}