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

158
Views
Cuando hacemos clic en buscar, debe hacer zoom en el área seleccionada. El área se resalta en el mapa y se amplía

Este es el sitio https://www.space-intelligence.com/scotland-landcover/# Cuando hace clic en las estadísticas regionales, se abre un menú desplegable y luego, cuando hace clic en Seleccionar región, se abre una ventana emergente y aquí selecciona la ciudad. y después de eso, haga clic en el botón de búsqueda. Pero no está haciendo nada. Cuando hace clic en buscar, debe hacer zoom en el área seleccionada. El área se resalta en el mapa y se amplía cuando hace clic en buscar.

Esta es la función:

 function areasearch(modalid) { var fid = $("#areasearch" + modalid).val(); $("#exampleModal" + modalid).modal('toggle'); map.data.forEach(function(feature) { if (fid != 0) { if (feature.i.ID != fid) { map.data.overrideStyle(feature, { visible: false }); feature.setProperty('visible', 'false'); } else { var bounds = new google.maps.LatLngBounds(); feature.getGeometry().forEachLatLng(function(latlng) { bounds.extend(latlng); }); map.fitBounds(bounds); map.data.overrideStyle(feature, { visible: true }); google.maps.event.trigger(map.data, 'click', feature.getId()); feature.setProperty('visible', 'true'); } } else { map.data.overrideStyle(feature, { visible: true }); feature.setProperty('visible', 'true'); } $('#exampleModal').modal('hide'); }); }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

usar setZoom()

Si experimenta algún problema con map.fitBounds() , intente usar el método setZoom() con el nivel de zoom deseado (se necesita int). También necesita centrar el mapa donde desea tener un enfoque con el método setCenter() (se necesita el objeto latLng).

Intente insertar las siguientes líneas con el valor deseado:

 map.setCenter({lat:YOUR_LATITUDE, lng:YOUR_LONGITUDE}); map.setZoom(6);

también puede leer esta sección de la documentación

about 4 years ago · Juan Pablo Isaza Report
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!