Fix lint errors
This commit is contained in:
+11
-7
@@ -1214,18 +1214,22 @@ export default class MapComponent extends Component {
|
||||
clickedSearchResult = searchResultFeature.get('originalPlace');
|
||||
} else {
|
||||
for (const feature of features) {
|
||||
const sourceLayer = feature.get?.('mvt:layer') || feature.get?.('layer');
|
||||
const sourceLayer =
|
||||
feature.get?.('mvt:layer') || feature.get?.('layer');
|
||||
const featureName = feature.get?.('name');
|
||||
const featureId = feature.getId?.();
|
||||
const { decoded, reason } = this.decodeVectorTileOsmFeature(feature);
|
||||
|
||||
if (decoded) {
|
||||
console.debug('Decoded vector tile feature to explicit OSM place:', {
|
||||
sourceLayer,
|
||||
featureName,
|
||||
featureId,
|
||||
decoded,
|
||||
});
|
||||
console.debug(
|
||||
'Decoded vector tile feature to explicit OSM place:',
|
||||
{
|
||||
sourceLayer,
|
||||
featureName,
|
||||
featureId,
|
||||
decoded,
|
||||
}
|
||||
);
|
||||
clickedTileOsmFeature = decoded;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -35,10 +35,13 @@ module('Unit | Component | map', function () {
|
||||
},
|
||||
};
|
||||
|
||||
assert.deepEqual(MapComponent.prototype.decodeVectorTileOsmFeature(feature), {
|
||||
decoded: null,
|
||||
reason: 'unsupported source layer: transportation',
|
||||
});
|
||||
assert.deepEqual(
|
||||
MapComponent.prototype.decodeVectorTileOsmFeature(feature),
|
||||
{
|
||||
decoded: null,
|
||||
reason: 'unsupported source layer: transportation',
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
test('it ignores unsupported or invalid vector tile ids', function (assert) {
|
||||
@@ -52,9 +55,12 @@ module('Unit | Component | map', function () {
|
||||
},
|
||||
};
|
||||
|
||||
assert.deepEqual(MapComponent.prototype.decodeVectorTileOsmFeature(feature), {
|
||||
decoded: null,
|
||||
reason: 'feature id suffix 0 is not an OSM type',
|
||||
});
|
||||
assert.deepEqual(
|
||||
MapComponent.prototype.decodeVectorTileOsmFeature(feature),
|
||||
{
|
||||
decoded: null,
|
||||
reason: 'feature id suffix 0 is not an OSM type',
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user