Merge pull request #11017 from fredj/geoloc_stop_tracking
Don't stop geolocation tracking on error
This commit is contained in:
@@ -1,5 +1,19 @@
|
|||||||
## Upgrade notes
|
## Upgrade notes
|
||||||
|
|
||||||
|
### v6.3.2
|
||||||
|
|
||||||
|
#### Backwards incompatible changes
|
||||||
|
|
||||||
|
##### Geolocation no longer stop tracking after an error
|
||||||
|
|
||||||
|
Previously, when the Geolocation class encounter an error the tracking was stopped. It now continues to track.
|
||||||
|
To get the previous behavior, use the following code:
|
||||||
|
```js
|
||||||
|
geolocation.on('error', function (error) {
|
||||||
|
geolocation.setTracking(false);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
### v6.3.0
|
### v6.3.0
|
||||||
|
|
||||||
#### Vector source loading when extent crosses +/-180
|
#### Vector source loading when extent crosses +/-180
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ class Geolocation extends BaseObject {
|
|||||||
* @param {PositionError} error error object.
|
* @param {PositionError} error error object.
|
||||||
*/
|
*/
|
||||||
positionError_(error) {
|
positionError_(error) {
|
||||||
this.setTracking(false);
|
|
||||||
this.dispatchEvent(new GeolocationError(error));
|
this.dispatchEvent(new GeolocationError(error));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user