Skip to content

Commit

Permalink
Fix variable naming case convention
Browse files Browse the repository at this point in the history
  • Loading branch information
jdudley1123 committed Dec 2, 2024
1 parent 0077175 commit 5dfe005
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/javascript/controllers/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export default class MapController extends Controller {
}

async updateZoneLabels() {
const pollutant_forecasts = await this.getForecastData();
const pollutantForecasts = await this.getForecastData();

// Remove existing zone labels
this.layers.zoneLabels?.forEach((marker) => this.map.removeLayer(marker));
Expand All @@ -257,13 +257,13 @@ export default class MapController extends Controller {
lat: zone.properties.center[1],
lng: zone.properties.center[0],
};
const pollutant_value = pollutant_forecasts[zone.properties.name];
const pollutantValue = pollutantForecasts[zone.properties.name];

const marker = L.marker(center, {
icon: L.divIcon({
className:
"zone-label " + `zone-label-level-${zone.properties.level}`,
html: `<div class="wrapper"><span class="daqi-indicator daqi-level-${pollutant_value}">${pollutant_value}</span><span class="zone-name">${zone.properties.name}</span></div>`,
html: `<div class="wrapper"><span class="daqi-indicator daqi-level-${pollutantValue}">${pollutantValue}</span><span class="zone-name">${zone.properties.name}</span></div>`,
}),
});
marker.addTo(this.map);
Expand Down

0 comments on commit 5dfe005

Please sign in to comment.