🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

leaflet-geocoder-ban

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-geocoder-ban - npm Package Compare versions

Comparing version

to
1.0.6

2

package.json
{
"name": "leaflet-geocoder-ban",
"version": "1.0.5",
"version": "1.0.6",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

# leaflet-geocoder-ban [![NPM version](https://img.shields.io/npm/v/leaflet-geocoder-ban.svg)](https://www.npmjs.com/package/leaflet-geocoder-ban) ![Leaflet 1.0.0 compatible!](https://img.shields.io/badge/Leaflet%201.0.0-%E2%9C%93-1EB300.svg?style=flat)
A simple Leaflet Plugin to add a geocoding control to your map, powered by the french [BAN](https://adresse.data.gouv.fr/) (Base Adresse Nationale) API. This API only covers French addresses.
Check the online [demo](https://eig-2017.github.io/leaflet-geocoder-ban/demo/).
Check the online [demo](https://entrepreneur-interet-general.github.io/leaflet-geocoder-ban/demo/).

@@ -61,3 +61,3 @@ # Installation

## custom markgeocode function
# Custom markgeocode function
When you select a result on the geocoder, it calls a default `markGeocode` function. If you want to call a custom function, override it. It receives as argument the result given by the BAN API as described [here](https://adresse.data.gouv.fr/api)

@@ -79,1 +79,20 @@

```
# Methods
| method | description |
|------------------|-----------------------------|
| collapse() | collapses the geocoder |
| expand() | expands the geocoder |
| toggle() | toggles between expanded and collapsed state |
| remove() | removes the geocoder |
## example
```javascript
var geocoder = L.geocoderBAN().addTo(map)
map.on('contextmenu', function () {
geocoder.toggle()
})
```

Sorry, the diff of this file is not supported yet