Skip to content

Commit

Permalink
Linting Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanBirtch-aot committed Feb 26, 2025
1 parent 42a4dfa commit 3764db9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions components/src/components/Map/services/BCGeocoderProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ export class BCGeocoderProvider extends OpenStreetMapProvider {
};
parse = ({ data }) => {
return data.features
.filter(function (feature) {
.filter((feature) => {
if (!feature.geometry.coordinates) return false;
if (feature.properties.fullAddress === 'BC') return false;
return true;
})
.map(function (feature) {
.map((feature) => {
return {
x: feature.geometry.coordinates[0],
y: feature.geometry.coordinates[1],
Expand Down
15 changes: 7 additions & 8 deletions components/src/components/Map/services/MapService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ class MapService {
const { map, drawnItems, drawControl } = this.initializeMap(options);
this.map = map;

// this.map = map;
this.drawnItems = drawnItems;
this.drawControl = drawControl; // Store the draw control globally
if (this.options.defaultValue?.features.length !== 0) {
this.defaultFeatures = this.arrayToFeatureGroup(
this.options.defaultValue?.features
//defaultFeatures are stored in a naive fashion for ease
//of readability for CHEFS reviewers
// defaultFeatures are stored in a naive fashion for ease
// of readability for CHEFS reviewers
);
}

Expand Down Expand Up @@ -266,9 +265,9 @@ class MapService {
if (!Array.isArray(items)) {
items = [items];
}
//items are stored in a naive fashion for ease
//of readability for CHEFS reviewers
let features = this.arrayToFeatureGroup(items);
// items are stored in a naive fashion for ease
// of readability for CHEFS reviewers
const features = this.arrayToFeatureGroup(items);
features.getLayers().forEach((feature) => {
if (!this.isFeatureInArray(feature, drawnItems.getLayers())) {
drawnItems.addLayer(feature);
Expand Down Expand Up @@ -309,7 +308,7 @@ class MapService {
return this.getFeatureType(d) === featureType;
}); // filter out the types that don't match
if (sameTypes.length === 0) {
//no matching types, no match
// no matching types, no match
return false;
}
return sameTypes.some((f) => {
Expand All @@ -336,7 +335,7 @@ class MapService {
}

arrayToFeatureGroup(array) {
let features = new L.FeatureGroup();
const features = new L.FeatureGroup();
array.forEach((item) => {
let layer;
if (item.type === 'marker') {
Expand Down

0 comments on commit 3764db9

Please sign in to comment.