{"id":13907471,"url":"https://github.com/stefanocudini/leaflet-gps","last_synced_at":"2025-04-08T03:16:57.400Z","repository":{"id":6883625,"uuid":"8132976","full_name":"stefanocudini/leaflet-gps","owner":"stefanocudini","description":"Simple leaflet control plugin for tracking gps position","archived":false,"fork":false,"pushed_at":"2023-08-11T10:14:18.000Z","size":313,"stargazers_count":117,"open_issues_count":3,"forks_count":46,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-31T17:19:56.579Z","etag":null,"topics":["gps","leaflet","leaflet-plugins","location","mobile-web","webmapping"],"latest_commit_sha":null,"homepage":"https://opengeo.tech/maps/leaflet-gps","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}},"created_at":"2013-02-11T05:13:30.000Z","updated_at":"2024-11-17T14:12:31.000Z","dependencies_parsed_at":"2023-09-27T03:38:18.816Z","dependency_job_id":null,"html_url":"https://github.com/stefanocudini/leaflet-gps","commit_stats":{"total_commits":109,"total_committers":11,"mean_commits":9.909090909090908,"dds":0.1834862385321101,"last_synced_commit":"3278b4f9df4fa5ef4ce042bdcb9d10547b0597bb"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-gps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-gps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-gps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanocudini%2Fleaflet-gps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanocudini","download_url":"https://codeload.github.com/stefanocudini/leaflet-gps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767237,"owners_count":20992548,"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":["gps","leaflet","leaflet-plugins","location","mobile-web","webmapping"],"created_at":"2024-08-06T23:01:57.242Z","updated_at":"2025-04-08T03:16:57.378Z","avatar_url":"https://github.com/stefanocudini.png","language":"JavaScript","funding_links":["https://www.paypal.me/stefanocudini"],"categories":["JavaScript"],"sub_categories":[],"readme":"Leaflet.Control.GPS\n============\n\n[![npm version](https://badge.fury.io/js/leaflet-gps.svg)](http://badge.fury.io/js/leaflet-gps)\n\n\nA leaflet control plugin for tracking gps position\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.7 and 1.3.0\n\n**Demos online:**  \n[opengeo.tech/maps/leaflet-gps](https://opengeo.tech/maps/leaflet-gps/)\n\n# How to use\n\nAdding the GPS Control to the map:\n\n```\nmap.addControl( new L.Control.Gps() );\n```\n\n# Debugging\n\nI recommend a chrome extension: 'Manual Geolocation'\nfor simulate gps device and set realtime position\n\n[Manual Geolocation](https://chrome.google.com/webstore/detail/manual-geolocation/mfodligkojepnddfhkbkodbamcagfhlo)\n\nYou can also use a dummy `transform` function:\n\n```\nvar tinnedGps = { lat: 52.5, lng: -2.0 };\nmap.addControl( new L.Control.Gps( { transform: function(realGps) { return tinnedGps; } ) );\n```\n\n# Where\n\n**Demos online:**  \n[opengeo.tech/maps/leaflet-gps](https://opengeo.tech/maps/leaflet-gps/)\n\n**Source code:**  \n[Github](https://github.com/stefanocudini/leaflet-gps)  \n[Bitbucket](https://bitbucket.org/stefanocudini/leaflet-gps)  \n[NPM](https://npmjs.org/package/leaflet-gps)  \n[Atmosphere](https://atmosphere.meteor.com/package/leaflet-gps)\n\n# Options\n| Options\t\t\t| Default\t\t\t  | Description                               |\n| ---------------------- | ---------------------- | ----------------------------------------- |\n| autoActive  | false  | activate control at startup         |\n| autoCenter  | false  | move map when gps location change   |\n| maxZoom     | null   | max zoom for autoCenter             |\n| textErr     | ''     | error message on alert notification |\n| callErr     | null   | function that run on gps error activating |\n| style       | {radius:5,color:'#c20',fillColor:'#f23'}  | default L.CircleMarker styles |\n| marker      | null   | L.Marker used for location, default use a L.CircleMarker |\n| accuracy    | true   | show accuracy Circle |\n| title       | 'Center map on your location' | title control on mouse over |\n| position    | 'topleft' | control position on map |\n| transform   | function(latlng) { return latlng } | return location before for gps marker |\n| setView     | false  | automatically sets the map view to the user location |\n\n# Events\n| Event\t\t\t | Data\t\t\t  | Description                               |\n| ---------------------- | ---------------------- | ----------------------------------------- |\n| 'gps:located' | {marker, latlng} | fired after gps marker is located |\n| 'gps:disabled'\t | {marker}\t                  | fired after gps is disabled          |\n\n# Methods\n| Method\t\t| Arguments\t\t | Description                  |\n| --------------------- | ---------------------- | ---------------------------- |\n| getLocation()\t\t| \t | return Latlng and marker of current position  |\n| activate()           |  \t | active tracking on runtime           |\n| deactivate()\t\t| \t | deactive tracking on runtime |\n\n\n\n\n# Use Cases\nThis list is intended to be of utility for all developers who are looking web mapping sample code to solve complex problems of integration with other systems using Leaflet Control GPS.\n\n**Anyone can add the link of your website**\n\n*(spamming urls will be automatically deleted)*\n\n* [Refuges.info](https://www.refuges.info/gps/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanocudini%2Fleaflet-gps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanocudini%2Fleaflet-gps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanocudini%2Fleaflet-gps/lists"}