HTML5 navigator.geolocation in Web Workers

后端 未结 4 467
温柔的废话
温柔的废话 2020-12-07 01:47

I am trying to move my code for navigator.geolocation in a web worker.

I tried it with Chrome and Safari but getting \'undefined\' on

var isGPSSupported =

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 02:16

    Would it not suffice to have the watchPosition(success) in the main-thread postMessage() the new location to your webWorker?

提交回复
热议问题