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

154
Views
Desactivar capas/carpetas en los mapas javascript incrustados de Google

Estoy usando la API de Google Javascript Maps para incrustar un mapa con datos KML con el fragmento de código que se usa con frecuencia:

 <script type="text/javascript"> function detectBrowser() { var useragent = navigator.userAgent; var mapdiv = document.getElementById("map-canvas"); if (useragent.indexOf('iPhone') != -1 || useragent.indexOf('Android') != -1 ) { mapdiv.style.width = '100%'; //mapdiv.style.height = '100%'; mapdiv.style.height = '600px'; } else { mapdiv.style.width = '600px'; mapdiv.style.height = '600px'; } } function initialize() { detectBrowser(); var mapOptions = { gestureHandling: 'cooperative' }; var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var georssLayer = new google.maps.KmlLayer({ url: "https://www.google.com/maps/d/kml?mid=19vJ5I6283iXcFINgp4U_JnqmbiXMySwD", map: map, }); georssLayer.setMap(map); } google.maps.event.addDomListener(window, 'load', initialize); </script> <div style="width: 600px; height: 600px; margin: 0 auto; padding: 10px;" id="map-canvas"></div>

Quiero usar un archivo KML que tenga varias carpetas (o "capas" en el idioma de MyMaps), pero quiero poder seleccionar qué carpetas mostrar. ¿Hay alguna forma de cargar KML con KmlLayer y luego activar/desactivar carpetas por nombre?

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!