stefanocudini / leaflet-compass Goto Github PK
View Code? Open in Web Editor NEWLeaflet plugin to show a rotating Compass!
Home Page: https://opengeo.tech/maps/leaflet-compass/
License: MIT License
Leaflet plugin to show a rotating Compass!
Home Page: https://opengeo.tech/maps/leaflet-compass/
License: MIT License
leaflet1.3.4 不能使用compass
Check compatibility on: https://github.com/stefanocudini/leaflet-compass/blob/master/src/leaflet-compass.js#L94
iOS:
self._rotateCompass(e.webkitCompassHeading);
HTML5!
self._rotateCompass(-e.alpha);
Reference:
http://www.w3.org/TR/orientation-event/
Could use an update for Meteor 0.9+.
unbind onRemove control
The compass it not working. Error shows: oritentation angle not found..
I use the example, compass working and direction showing accurate..
But when tested on latest leaflet version 1.9, the compass showing wrong direction..
Tested in Android Pie, using browser Chrome dan Firefox.
Hello team, great works!
One question. How to apply the same rotation to the map, instead of to the compass?
window.addEventListener("compassneedscalibration", function(event) {
alert('Your compass needs calibrating! Wave your device in a figure-eight motion');
event.preventDefault();
}, true);
I would like to experiment with leaflet-compass
however, I am having trouble creating the required typescript definitions.
I am not using angular.
The demo https://opengeo.tech/maps/leaflet-compass/examples/simple.html matches my own experience in that it always shows 0°
iPhone SE, iOS 15.7.1 (latest as of today); more info on request
I try to add this in angular, and so far I could not... even extend module on top.
Property 'Compass' does not exist on type 'typeof Control'.ts(2339)
Hi
Perhaps this._divcompass.style.webkitTransform = "rotate(" + angle + "deg)";
is not available in FireFox.
nota: it works with Chromium 48.
write method table in readme
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.