Skip to content

Commit

Permalink
Last cosmetics before v4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominique92 committed Sep 5, 2023
1 parent d5644bb commit 1b7c079
Show file tree
Hide file tree
Showing 21 changed files with 397 additions and 351 deletions.
30 changes: 30 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
},
"globals": {
"ol": "readonly",
"Geocoder": "readonly"
}
}
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ I would like to thank them and the entire development team for the fantastic wor
# OpenLayers Control Geocoder
<p align="center">
<a href="https://www.npmjs.com/package/ol-geocoder">
<img src="https://img.shields.io/npm/v/ol-geocoder.svg"
alt="npm version">
<img src="https://img.shields.io/npm/v/ol-geocoder.svg" alt="npm version">
</a>
<a href="https://github.com/Dominique92/ol-geocoder/blob/master/LICENSE">
<img src="https://img.shields.io/npm/l/ol-geocoder.svg"
alt="license">
<img src="https://img.shields.io/npm/l/ol-geocoder.svg" alt="license">
</a>
</p>

A geocoder extension compatible with OpenLayers v7. **Requires** OpenLayers **v6.15.0** or higher.
A geocoder extension compatible with OpenLayers v7 & v8 (Tested with all versions from v6.15.1 to v8.0.0).

![geocoder anim](https://raw.githubusercontent.com/Dominique92/ol-geocoder/screenshots/images/anim.gif)

## Demo
You can see [here a demo](http://rawgit.com/jonataswalker/ol-geocoder/master/examples/control-nominatim.html) or on [jsFiddle](http://jsfiddle.net/jonataswalker/c4qv9afb/) if you prefer. There is also a [demo of creating a custom provider](http://rawgit.com/jonataswalker/ol-geocoder/master/examples/custom-provider.html)
You can see [here a demo](http://dominique92.github.io/ol-geocoder/examples/control-nominatim.html)
or on [jsFiddle](http://jsfiddle.net/Dominique92/c4qv9afb/) if you prefer.
There is also a [demo of creating a custom provider](http://dominique92.github.io/ol-geocoder/examples/custom-provider.html)

## Providers
The plugin supports (for now) the following providers:
Expand All @@ -39,35 +40,53 @@ For an example of defining and using a custom provider see [`examples/custom-pro
Custom providers must implement the following methods:

#### `getParameters(options)`

* `options` `{Object}`
* `query` Search string entered by the user;
* `lang` `{string}` Preferable language;
* `limit` `{number}` Limit of results;

#### `handleResponse(results)`

* `results` `{Object}` Parsed JSON response from API call

## How to use it?

## What's new in 4.3.0 ?
* search form outside map [#87](https://github.com/Dominique92/ol-geocoder/issues/87)
* Geocoder does not zoom to the location correctly [#228](https://github.com/Dominique92/ol-geocoder/issues/228)
* ol-geocoder results are too much zoomed -in [#235](https://github.com/Dominique92/ol-geocoder/issues/235)
* Toggle Marker in Options [#239](https://github.com/Dominique92/ol-geocoder/issues/239)
* Using Search Function Outside Div [#247](https://github.com/Dominique92/ol-geocoder/issues/247)
* Search Button - search does not work from smartphone if there is another text field [#255](https://github.com/Dominique92/ol-geocoder/issues/255)
* Remove search layer from legend [#256](https://github.com/Dominique92/ol-geocoder/issues/256)
* Limit search result to extent [#260](https://github.com/Dominique92/ol-geocoder/issues/260)
* Allow custom URL for osm provider [#266](https://github.com/Dominique92/ol-geocoder/issues/266)
* Init error on 4.2.0 [#270](https://github.com/Dominique92/ol-geocoder/issues/270)
* src/nominating.js better import on 4.2.0 [#271](https://github.com/Dominique92/ol-geocoder/issues/271)
* Error on bbox returned by nominatim.js 4.2.0 on Openlayers 7.4.0+ [#272](https://github.com/Dominique92/ol-geocoder/issues/272)
* fix(examples): map height and width were 0px for custom provider [#276](https://github.com/Dominique92/ol-geocoder/issues/276)

##### NPM
`npm install ol-geocoder`

##### CDN Hosted - [jsDelivr](https://www.jsdelivr.com/package/npm/ol-geocoder)
##### CDN hosted - [jsDelivr](https://www.jsdelivr.com/package/npm/ol-geocoder)
Load CSS and Javascript:
```HTML
<link href="https://cdn.jsdelivr.net/npm/ol-geocoder@latest/dist/ol-geocoder.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/ol-geocoder"></script>
```

##### CDN Hosted - UNPKG
##### CDN hosted - unpkg
Load CSS and Javascript:
```HTML
<link href="https://unpkg.com/ol-geocoder/dist/ol-geocoder.min.css" rel="stylesheet">
<script src="https://unpkg.com/ol-geocoder"></script>
```

##### Github pages hosted
Load CSS and Javascript:
```HTML
<link rel="stylesheet" href="http://dominique92.github.io/ol-geocoder/dist/ol-geocoder.css">
<script src="http://dominique92.github.io/ol-geocoder/dist/ol-geocoder-debug.js"></script>
```

##### Self hosted
Download [latest release](https://github.com/Dominique92/ol-geocoder/releases/latest) and (obviously) load CSS and Javascript.

Expand Down
4 changes: 3 additions & 1 deletion build/banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
* {description}
* {homepage}
* Built: {time}
*/
*/


170 changes: 86 additions & 84 deletions dist/ol-geocoder-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ol-geocoder-debug.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions dist/ol-geocoder.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/*!
* ol-geocoder - v4.2.1
* ol-geocoder - v4.3.0
* A geocoder extension compatible with OpenLayers v7+ & v8+
* https://github.com/Dominique92/ol-geocoder
* Built: Mon Sep 04 2023 16:09:30 GMT+0200 (heure d’été d’Europe centrale)
*/.ol-touch .ol-control.gcd-gl-control button {
* Built: Tue Sep 05 2023 21:03:57 GMT+0200 (heure d’été d’Europe centrale)
*/

.ol-touch .ol-control.gcd-gl-control button {
font-size: 1.14em; }

.ol-touch .ol-geocoder.gcd-gl-container {
Expand Down
6 changes: 3 additions & 3 deletions dist/ol-geocoder.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ol-geocoder.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 1b7c079

Please sign in to comment.