@@ -8,17 +8,37 @@ Note: if you want location autosuggest then what you want is [OpenCage's geosear
88
99## Installation
1010
11- You have three options
11+ Starting with version 2.1, Bower is no longer supported. The package is now published on npm in both UMD and ESM formats.
1212
13- - Clone from GitHub:
` [email protected] :opencagedata/leaflet-opencage-geocoding.git` 13+ ### Via npm
14+
15+ ``` bash
16+ npm install leaflet-opencage-geocoding
17+ ```
1418
15- or
19+ The package includes both UMD and ESM builds, which you can import based on your project setup:
1620
17- - Download a [ zip or tarball archive] ( https://github.com/opencagedata/leaflet-opencage-geocoding/tags )
21+ ``` javascript
22+ // ESM
23+ import ' leaflet-opencage-geocoding' ;
24+
25+ // CommonJS
26+ require (' leaflet-opencage-geocoding' );
27+ ```
1828
19- or
29+ ### Via CDN (for vanilla JS/HTML projects)
2030
21- - Install (using the old plugin's name) with Bower : ` $ bower install Leaflet.OpenCage.Search `
31+ For classic HTML projects, you can use the CDN:
32+
33+ ``` html
34+ <
link rel =
" stylesheet" href =
" https://cdn.jsdelivr.net/gh/opencagedata/[email protected] /dist/css/L.Control.OpenCageGeocoding.min.css" />
35+ <
script src =
" https://cdn.jsdelivr.net/gh/opencagedata/[email protected] /dist/js/L.Control.OpenCageGeocoding.min.js" ></
script >
36+ ```
37+
38+ ### Other options
39+
40+ - Clone from GitHub:
` [email protected] :opencagedata/leaflet-opencage-geocoding.git` 41+ - Download a [ zip or tarball archive] ( https://github.com/opencagedata/leaflet-opencage-geocoding/tags )
2242
2343## Configuration
2444
@@ -36,8 +56,8 @@ two image files to a directory relative to the location of the control's CSS fil
3656Load the plugin's CSS and JavaScript files:
3757
3858``` HTML
39- <link rel =" stylesheet" href =" https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.0 .0/dist/css/L.Control.OpenCageGeocoding.min.css" />
40- <script src =" https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.0 .0/dist/js/L.Control.OpenCageGeocoding.min.js" ></script >
59+ <link rel =" stylesheet" href =" https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.1 .0/dist/css/L.Control.OpenCageGeocoding.min.css" />
60+ <script src =" https://cdn.jsdelivr.net/gh/opencagedata/leaflet-opencage-geocoding@v2.1 .0/dist/js/L.Control.OpenCageGeocoding.min.js" ></script >
4161```
4262
4363Add the plugin's control to an ` L.Map ` instance:
0 commit comments