Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

266
Views
API de mapas de Google: posición del marcador y cambio de mapa

Estaba usando Leaflet hasta ahora, ahora estoy usando Google Map (100% del ancho de la pantalla).

Tengo un marcador que se colocó en el centro del mapa. ¿Cómo puedo cambiar el mapa para que el marcador se muestre en el 75% de la pantalla?

Básicamente, quiero cambiar de esta pantalla

 <---screen width--> ___________________ | | | x | |_________________|

A ese

 <---screen width--> ___________________ | | | x | |_________________|

Así es como coloco mi marcador ahora:

 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); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!