Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

213
Visualizações
La variable y el parámetro se declaran pero nunca se leen en jQuery AJAX Request Leaflet y JavaScript

Estoy trabajando tratando de trazar, diseñar y dimensionar los puntos de cirlceMarker en Leaflet/JS con una solicitud de jQuery AJAX y casi de inmediato obtengo una variable modeLayer y una función de parámetro que se declaran pero nunca leen el mensaje. Los puntos se dibujan usando la función pointToLayer sin estilo, pero todas las funciones subsiguientes parecen no funcionar. No se muestran errores en la consola. ¿Alguna idea de lo que me estoy perdiendo aquí?

 const commonStyles = { weight: 1, stroke: 1, fillOpacity: .8 } // jQuery method using AJAX request for GeoJSON data // add sviPoint data $.getJSON("data/cdps_svis_whp_ctr.json", function (sviPoints) { var moderateLayer = L.geoJson(sviPoints, { pointToLayer: function (feature, latlng) { // Draw circle marker based on pointToLayer function return L.circleMarker(latlng, commonStyles); }, // filter layer to display only class value of moderate filter: function (feature) { if (feature.properties.WHP_CLASS.Moderate) { return feature; } }, // style stroke and fill style: function (feature) { return { color: '#FF4000', fillColor: '#FF4000', // call function get radius from overall svi weighted mean radius: getRadius(feature.properties.OVERALL_WM) } }, onEachFeature: function (feature, layer) { // on mouseover change color to darker shade of orange layer.on('mouseover', function () { layer.setStyle({ fillColor: '#401000' }); }); // return to original fill color when not hovering with mouse layer.on('mouseout', function () { layer.setStyle({ fillColor: '#FF4000' }); }); var popup = `<h4>${feature.properties.CDP_STATE}</h4> <p><b>Overall SVI:</b> ${feature.properties.OVERALL_WM}<br> <p><b>Wildfire Hazard Potential:</b> ${feature.properties.WHP_CLASS}<br>` // Loop through all fuel sources in plants that split atoms // for (var fuelSource in feature.properties.fuel_source) { // // View the source // console.log(fuelSource) // // Concat all fuel sources // popup += `<br>${fuelSource}: ${feature.properties.fuel_source[fuelSource]} MW` // } layer.bindPopup(popup) } }).addTo(map); });
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda