Geolocation control does not work in Safari
mapbox-gl-js version: 0.29.0
Steps to Trigger Behavior
- Open the geolocation example in Safari.
Expected Behavior
Geolocation control is created.
Actual Behavior
Geolocation control is not created and TypeError: undefined is not an object (evaluating 'this.options.watchPosition') appears in the console.
The control is added in Chrome, but Uncaught (in promise) TypeError: Cannot read property 'watchPosition' of undefined appears in the console.
cc @andrewharvey
I think I fixed this in https://github.com/mapbox/mapbox-gl-js/pull/3781/files#diff-d0e111bf718e3946d87f7b39b21dfce4R73, but missed back porting it to master.
I'll submit a PR back porting the fix.
This issue is still happening for me on Safari 14.0.
Still happening 2022
Still happening 2023
Hi,
Could you please include information about the GL JS version, browser version, and operating system used?