Skip to content

Commit

Permalink
do not auto-activate the compass on MirKarte load
Browse files Browse the repository at this point in the history
iPhoneOS devices (and possibly others) need to ask for permission
first, which is only allowed as the response to a gesture from the
user (i.e. click)

addresses stefanocudini/leaflet-compass#15
(partially)
  • Loading branch information
mirabilos committed Nov 23, 2022
1 parent 97a0485 commit 7e3dce2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@ $(document).observe("dom:loaded", function () {
map.addControl(ctl_compass);

map_initialised = true;
ctl_compass.activate();
map.on("moveend", function () {
var newloc = map.getCenter();

Expand Down
1 change: 0 additions & 1 deletion mirkarte.js
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,6 @@ $(document).observe("dom:loaded", function () {
map.addControl(ctl_compass);

map_initialised = true;
ctl_compass.activate();
map.on("moveend", function () {
var newloc = map.getCenter();

Expand Down

0 comments on commit 7e3dce2

Please sign in to comment.