Merge pull request #2274 from yohanboniface/watch
Firefox has a Object.prototype.watch method
This commit is contained in:
commit
4fc4cadd11
@ -27,7 +27,7 @@ L.Map.include({
|
||||
var onResponse = L.bind(this._handleGeolocationResponse, this),
|
||||
onError = L.bind(this._handleGeolocationError, this);
|
||||
|
||||
if (options.watch) {
|
||||
if (options.hasOwnProperty('watch') && options.watch) {
|
||||
this._locationWatchId =
|
||||
navigator.geolocation.watchPosition(onResponse, onError, options);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user