mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Geolocation control does not work in Safari

Open danswick opened this issue 9 years ago • 5 comments

mapbox-gl-js version: 0.29.0

Steps to Trigger Behavior

  1. 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

danswick avatar Dec 21 '16 03:12 danswick

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.

andrewharvey avatar Dec 21 '16 03:12 andrewharvey

This issue is still happening for me on Safari 14.0.

MickCoelho avatar Oct 01 '20 18:10 MickCoelho

Still happening 2022

wmonecke avatar Sep 01 '22 14:09 wmonecke

Still happening 2023

paulsUsername avatar Mar 31 '23 13:03 paulsUsername

Hi,

Could you please include information about the GL JS version, browser version, and operating system used?

stepankuzmin avatar Mar 31 '23 14:03 stepankuzmin