
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
@opencage/ol-opencage-geosearch
Advanced tools
An OpenLayers geosearch control that uses OpenCage's geosearch API.
@opencage/ol-opencage-geosearchAn OpenLayers plugin that lets you quickly add a search box and help your users find locations on the map
Check out a demo page in /openlayers-library-example. Or take a look at the live demo.
Tested with versions:
This plugin at the moment uses the Opencage geoseach SDK bundle with alogolia's autocomplete. Check the instructions.
This plugin will be compatible with the same browsers / device than the OpenLayers library is.
Load the plugin's CSS and JavaScript files:
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@opencage/ol-opencage-geosearch/ol-opencage-geosearch.css"
/>
<script src="https://cdn.jsdelivr.net/npm/@opencage/geosearch-bundle"></script>
<script src="https://cdn.jsdelivr.net/npm/@opencage/ol-opencage-geosearch"></script>
and insert this new control to your leaflet map:
const options = {
key: 'YOUR_OPENCAGE_GEOSEARCH_KEY',
// you will need to become a customer to get a geosearch key
//
// limit: 3,
// noResults: 'Pas de résultat.',
//
// openlayers options:
position: 'topright', // Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'
};
var controlGeosearch = new OpenCageGeosearchControl(options);
map.addControl(controlGeosearch);
the options parameter has the same API as the core sdk
the events from the core sdk can be included directly in the options parameter.
| example:
const options = {
key: window.OPENCAGE_GEOSEARCH_KEY,
// you will need to become a customer to get a geosearch key
//
onActive: () => {
console.log('Happy Geosearch');
},
//
// leafletjs options:
position: 'topright', // Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'
};
Licensed under the MIT License
A copy of the license is available in the repository's LICENSE file.
We run the OpenCage Geocoding API. Learn more about us.
We also run Geomob, a series of regular meetups for location based service creators, where we do our best to highlight geoinnovation. If you like geo stuff, you will probably enjoy the Geomob podcast.
FAQs
An OpenLayers geosearch control that uses OpenCage's geosearch API.
We found that @opencage/ol-opencage-geosearch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.