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

169
Views
Superposición de imagen de ancho completo en Leaflet js

Me gustaría configurar el ancho para que sea siempre el 100% del tamaño de la pantalla al hacer clic en alejar la imagen Superposición en el folleto.js, configuré todas las opciones para maxBounds y minZoom pero en tamaños grandes de pantalla al alejar la imagen, los límites aparecen como en la imagen de abajo. ¿Algunos podrían ayudarme en dónde me estoy equivocando?

 var secondaryMap = L.map("secondaryMap", { minZoom: -0.15, maxZoom: 1, center: L.latLng(-1165.5, 1032), zoom: 0, zoomSnap: 0.25, zoomDelta: 0.25, crs: L.CRS.Simple, scrollWheelZoom: false, maxBoundsViscosity: 1.0, interactive: true, doubleClickZoom: false, touchZoom: false, tap: true, tapTolerance: 50, bounceAtZoomLimits: false, attributionControl: false, zoomControl: false, }); // dimensions of the image var w = 2200, h = 1778, url = $('#secondaryMap').attr('src'); // calculate the edges of the image, in coordinate space var southWest = secondaryMap.unproject([0, h], secondaryMap.getMinZoom()); var northEast = secondaryMap.unproject([w, 0], secondaryMap.getMinZoom()); var bounds = new L.LatLngBounds(southWest, northEast); var layer = L.imageOverlay(url, bounds).addTo(secondaryMap); secondaryMap.fitBounds(bounds); secondaryMap.setMaxBounds(bounds);

ingrese la descripción de la imagen aquí

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!