{"id":13555812,"url":"https://github.com/Esri/esri-leaflet-geocoder","last_synced_at":"2025-04-03T08:32:14.021Z","repository":{"id":11621363,"uuid":"14119537","full_name":"Esri/esri-leaflet-geocoder","owner":"Esri","description":"helpers for using the ArcGIS World Geocoding Service in Leaflet","archived":false,"fork":false,"pushed_at":"2024-10-24T12:35:40.000Z","size":3696,"stargazers_count":244,"open_issues_count":8,"forks_count":101,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-25T13:32:36.602Z","etag":null,"topics":["arcgis","esri","esri-leaflet","hacktoberfest","leaflet-plugins","web-development"],"latest_commit_sha":null,"homepage":"http://esri.github.io/esri-leaflet/examples/geocoding-control.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Esri.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-11-04T18:24:46.000Z","updated_at":"2024-10-24T12:45:42.000Z","dependencies_parsed_at":"2023-01-13T16:35:27.624Z","dependency_job_id":"25bf5c34-82bd-451c-8488-a4a4b6538631","html_url":"https://github.com/Esri/esri-leaflet-geocoder","commit_stats":{"total_commits":351,"total_committers":29,"mean_commits":12.10344827586207,"dds":0.6353276353276354,"last_synced_commit":"d0afc754cb8ad03d2de0cf691c05cf34ab80e0ff"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fesri-leaflet-geocoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fesri-leaflet-geocoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fesri-leaflet-geocoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esri%2Fesri-leaflet-geocoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Esri","download_url":"https://codeload.github.com/Esri/esri-leaflet-geocoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246966109,"owners_count":20861996,"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":["arcgis","esri","esri-leaflet","hacktoberfest","leaflet-plugins","web-development"],"created_at":"2024-08-01T12:03:25.909Z","updated_at":"2025-04-03T08:32:09.009Z","avatar_url":"https://github.com/Esri.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","hacktoberfest"],"sub_categories":[],"readme":"# Esri Leaflet Geocoder\n\nThe Esri Leaflet Geocoder is a small series of API helpers and UI controls to interact with the ArcGIS Online geocoding services.\n\n[![npm version][npm-img]][npm-url]\n[![apache licensed](https://img.shields.io/badge/license-Apache-green.svg?style=flat-square)](https://raw.githubusercontent.com/Esri/esri-leaflet-geocoder/master/LICENSE)\n[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/esri-leaflet-geocoder/badge)](https://www.jsdelivr.com/package/npm/esri-leaflet-geocoder)\n\n[npm-img]: https://img.shields.io/npm/v/esri-leaflet-geocoder.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/esri-leaflet-geocoder\n\n## Example\n\nTake a look at the [live demo](https://developers.arcgis.com/esri-leaflet/samples/geocoding-control/).\n\n![Example Image](https://raw.github.com/esri/esri-leaflet-geocoder/master/example.png)\n\nTo run this demo, you need to replace 'YOUR_API_KEY' with your API key. If you do not have an account then sign up for free at [ArcGIS Developer](https://developers.arcgis.com/sign-up/).\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003ctitle\u003eEsri Leaflet Geocoder\u003c/title\u003e\n    \u003cmeta\n      name=\"viewport\"\n      content=\"initial-scale=1,maximum-scale=1,user-scalable=no\"\n    /\u003e\n\n    \u003c!-- Load Leaflet from CDN--\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://unpkg.com/leaflet/dist/leaflet.css\" /\u003e\n    \u003cscript src=\"https://unpkg.com/leaflet/dist/leaflet-src.js\"\u003e\u003c/script\u003e\n\n    \u003c!-- Load Esri Leaflet from CDN --\u003e\n    \u003cscript src=\"https://unpkg.com/esri-leaflet\"\u003e\u003c/script\u003e\n\n    \u003c!-- Esri Leaflet Geocoder --\u003e\n    \u003clink\n      rel=\"stylesheet\"\n      href=\"https://unpkg.com/esri-leaflet-geocoder/dist/esri-leaflet-geocoder.css\"\n    /\u003e\n    \u003cscript src=\"https://unpkg.com/esri-leaflet-geocoder\"\u003e\u003c/script\u003e\n\n    \u003c!-- Make the map fill the entire page --\u003e\n    \u003cstyle\u003e\n      #map {\n        position: fixed;\n        top: 0;\n        bottom: 0;\n        left: 0;\n        right: 0;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003cdiv id=\"map\"\u003e\u003c/div\u003e\n    \u003cscript\u003e\n      var map = L.map(\"map\").setView([45.5165, -122.6764], 12);\n      var tiles = L.esri.basemapLayer(\"Streets\").addTo(map);\n\n      // create the geocoding control and add it to the map\n      var searchControl = L.esri.Geocoding.geosearch({\n        providers: [\n          L.esri.Geocoding.arcgisOnlineProvider({\n            // API Key to be passed to the ArcGIS Online Geocoding Service\n            apikey: 'YOUR_API_KEY'\n          })\n        ]\n      }).addTo(map);\n\n      // create an empty layer group to store the results and add it to the map\n      var results = L.layerGroup().addTo(map);\n\n      // listen for the results event and add every result to the map\n      searchControl.on(\"results\", function (data) {\n        results.clearLayers();\n        for (var i = data.results.length - 1; i \u003e= 0; i--) {\n          results.addLayer(L.marker(data.results[i].latlng));\n        }\n      });\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n# API Reference\n\n## Controls\n\n### [`L.esri.Geocoding.geosearch`](http://esri.github.io/esri-leaflet/api-reference/controls/geosearch.html)\n\na control for auto-complete enabled search\n\n## Services\n\n### [`L.esri.Geocoding.geocodeService`](http://esri.github.io/esri-leaflet/api-reference/services/geocode-service.html)\n\nA basic wrapper for ArcGIS Online geocoding services. Used internally by `L.esri.Geocoding.geosearch`.\n\n## Tasks\n\n### [`L.esri.Geocoding.geocode`](http://esri.github.io/esri-leaflet/api-reference/tasks/geocode.html)\n\nAn abstraction for submitting requests to turn addresses into locations.\n\n### [`L.esri.Geocoding.suggest`](http://esri.github.io/esri-leaflet/api-reference/tasks/suggest.html)\n\nAn abstraction for submitting requests for geocoding suggestions.\n\n### [`L.esri.Geocoding.reverseGeocode`](http://esri.github.io/esri-leaflet/api-reference/tasks/reverse-geocode.html)\n\nAn abstraction for submitting requests for address candidates associated with a particular location.\n\n## Development Instructions\n\n1. [Fork and clone Esri Leaflet Geocoder](https://help.github.com/articles/fork-a-repo)\n2. `cd` into the `esri-leaflet-geocoder` folder and install the dependencies with `npm install`\n3. Run `npm start` from the command line. This will compile minified source in a brand new `dist` directory, launch a tiny webserver and begin watching the raw source for changes.\n4. The example at `debug/sample.html` _should_ 'just work'\n5. Make your changes and create a [pull request](https://help.github.com/articles/creating-a-pull-request)\n\n## Resources\n\n- [Geocoding Service Documentation](https://developers.arcgis.com/documentation/mapping-apis-and-services/search/services/geocoding-service/)\n- [ArcGIS Developer](http://developers.arcgis.com)\n- [ArcGIS REST services](https://developers.arcgis.com/rest/location-based-services/)\n- [twitter@EsriGeoDev](https://twitter.com/EsriGeoDev)\n\n## Issues\n\nFind a bug or want to request a new feature? Please let us know by submitting an issue.\n\n## Contributing\n\nEsri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/Esri/esri-leaflet/blob/master/CONTRIBUTING.md).\n\n## Terms and Conditions\n\nIn order use the ArcGIS geocoding service you need the following:\n\n1. An [ArcGIS Developer account](https://developers.arcgis.com/sign-up/) or [ArcGIS Online account](https://www.esri.com/en-us/arcgis/products/arcgis-online/trial).\n2. If your application uses an basemap layer service or other Esri data, you must display`Powered by`[`Esri`](http://esri.com) in the map attribution. See [Basemap attribution](https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/basemap-attribution/) for more details.\n\n## Not-stored vs stored geocodes\n\nTo determine if there is a cost associated with using the Esri Leaflet Geocoder and the ArcGIS geocoding service, if you have an ArcGIS Developer account, go to [Pricing](https://developers.arcgis.com/pricing/), or, if you have an ArcGIS Online account, go to [Credits by Capability](https://doc.arcgis.com/en/arcgis-online/administer/credits.htm#GUID-D309A4D0-43CD-4E58-A6DF-012A82A6D794).\n\nNote: To store geocoding results, pass `forStorage: true` and a valid access token (see [Esri Leaflet Get Started](https://developers.arcgis.com/esri-leaflet/get-started/)).\n\n- [ArcGIS Developer FAQ](https://developers.arcgis.com/faq/)\n- [Esri Terms of Use](https://www.esri.com/en-us/legal/terms/full-master-agreement)\n- [Complete ArcGIS geocode and search documentation](https://developers.arcgis.com/documentation/mapping-apis-and-services/search/)\n\n## Licensing\n\nCopyright \u0026copy; 2013-2022 Esri\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\u003e http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nA copy of the license is available in the repository's [LICENSE](https://raw.github.com/Esri/esri-leaflet-geocoder/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEsri%2Fesri-leaflet-geocoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEsri%2Fesri-leaflet-geocoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEsri%2Fesri-leaflet-geocoder/lists"}