
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
overpassql-loader
Advanced tools
This Webpack loader allows you to pull in OverpassQL files as strings, providing seamless integration of OpenStreetMap data into your application.
Not only does it allow you to directly load OverpassQL scripts as part of your Webpack build process, but it also optionally caches the responses from an Overpass API server to speed up your production application.
You can install the loader using npm, yarn, or your preferred JavaScript
package management program.
yarn add --dev overpassql-loader
or
npm install --save-dev overpassql-loader
Add overpassql-loader to your Webpack configuration:
import type { Configuration, RuleSetUse } from 'webpack';
import type { PropertiesFilter } from 'overpassql-loader';
const IS_DEV: boolean = (process.env.NODE_ENV === 'development');
const propertiesFilter: PropertiesFilter = (properties) => ({
return (Object.keys(properties)
.filter(tag => /addr:.*/i.test(tag))
.reduce((filtered, tag) => {
filtered[tag] = properties[tag];
return filtered;
}, {}));
});
const useOverpassql: RuleSetUse = {
test: /\.overpass(ql)?$/,
options: {
// minify the query
stripWhitespace: !IS_DEV,
stripComments: !IS_DEV,
// cache API response
cacheGeoJSON: !IS_DEV,
// remove tags we're not interested in
keepProperties: false,
propertiesFilter
}
}
export const config: Configuration = {
module: {
rules: [useOverpassql]
}
}
Use the import in your project:
import { overpassJson } from 'overpass-ts';
import osmtogeojson from 'osmtogeojson';
import query from './my-query.overpassql';
const endpoint: string = 'https://overpass-api.de/api/interpreter';
console.log(query); // print the query to console
overpassJson(query, { endpoint }).then((osmdata) => {
const geoJSON = osmtogeojson(osmdata);
// work with the GeoJSON or OSM response
// e.g., integrate with Leaflet.js GeoJSON layers
});
This project is licensed under the MIT License.
See LICENSE for more information.
FAQs
A webpack loader for OverpassQL files
The npm package overpassql-loader receives a total of 0 weekly downloads. As such, overpassql-loader popularity was classified as not popular.
We found that overpassql-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.