{"id":13907527,"url":"https://github.com/stefanocudini/leaflet-compass","last_synced_at":"2025-04-09T19:20:08.851Z","repository":{"id":18573497,"uuid":"21776317","full_name":"stefanocudini/leaflet-compass","owner":"stefanocudini","description":"Leaflet plugin to show a rotating Compass!","archived":false,"fork":false,"pushed_at":"2023-07-26T22:51:44.000Z","size":1006,"stargazers_count":95,"open_issues_count":4,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T19:20:03.038Z","etag":null,"topics":["compass","javascript","leaflet-plugin","leafletjs","mapping","mobile-app","webmapping"],"latest_commit_sha":null,"homepage":"https://opengeo.tech/maps/leaflet-compass/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanocudini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2014-07-12T20:52:31.000Z","updated_at":"2024-12-04T12:56:19.000Z","dependencies_parsed_at":"2024-04-09T11:35:28.847Z","dependency_job_id":"21525340-5af8-44bb-870d-03a5d4801b6e","html_url":"https://github.com/stefanocudini/leaflet-compass","commit_stats":{"total_commits":61,"total_committers":7,"mean_commits":8.714285714285714,"dds":0.2622950819672131,"last_synced_commit":"095cdc0cfff55273bc86c836441d5c0d8f81a97d"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-compass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-compass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-compass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-compass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanocudini","download_url":"https://codeload.github.com/stefanocudini/leaflet-compass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094991,"owners_count":21046770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compass","javascript","leaflet-plugin","leafletjs","mapping","mobile-app","webmapping"],"created_at":"2024-08-06T23:01:58.782Z","updated_at":"2025-04-09T19:20:08.813Z","avatar_url":"https://github.com/stefanocudini.png","language":"JavaScript","funding_links":["https://www.paypal.me/stefanocudini"],"categories":["JavaScript"],"sub_categories":[],"readme":"Leaflet.Control.Compass\n============\n\n[![npm version](https://badge.fury.io/js/leaflet-compass.svg)](https://badge.fury.io/js/leaflet-compass)\n\n\nA leaflet control plugin to make simple rotating compass\n\nIf this project helped your work help me to keep this alive by [Paypal **DONATION \u0026#10084;**](https://www.paypal.me/stefanocudini)\n\nTested in Leaflet 0.7 and 1.2\n\nrequire HTML5 API on mobile device!\n\n\n**Try the Demo online here:**  \n[opengeo.tech/maps/leaflet-compass](https://opengeo.tech/maps/leaflet-compass/)\n\n**Tested platforms:**\n\nthis project needs many tests on different devices, please help us using the demo page and report problems by opening an issue.\n\n* Chrome on Android\n* Safari on iOS\n\n![Image](./images/leaflet-compass.png)\n\n# Usage\n\nAdding the Compass Control to the map:\n\n```\nmap.addControl( new L.Control.Compass() );\n\n```\n\n# Options\n\n| Option\t  | Default  | Description                   |\n| ----------- | -------- | ----------------------------- |\n| autoActive  | false | activate control at startup |\n| showDigit\t  | false | show angle value bottom compass |\n| textErr\t  | ''   | error message on alert notification |\n| callErr\t  | null | function that run on compass error activating |\n| angleOffset | 2 | min angle deviation before rotate, big angleOffset is need for device have noise in orientation sensor |\n| position\t  | 'topright' | position of control inside map |\n\n# Methods\n\n| Method\t  | Arguments      | Description                   |\n| ----------- | -------------- | ----------------------------- |\n| autoActive  | false          | activate control at startup   |\n| getAngle    |                | return Azimut angle           |\n| setAngle    | angle          | set rotation compass          |\n| activate    |                | active tracking on runtime    |\n| deactivate  |                | deactive tracking on runtime  |\n\n# Events\n\n| Event\t            | Data           | Description                         |\n| ----------------- | -------------- | ----------------------------------- |\n| 'compass:rotated' | angle          | fired after compass data is rotated |\n| 'compass:disabled'|                | fired when compass is disabled      |\n\n\n# Where\n\n**Source code:**\n\n[Github](https://github.com/stefanocudini/leaflet-compass)  \n[NPM](https://npmjs.org/package/leaflet-compass)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanocudini%2Fleaflet-compass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanocudini%2Fleaflet-compass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanocudini%2Fleaflet-compass/lists"}