{"id":15006450,"url":"https://github.com/maptiler/maptiler-geocoding-control","last_synced_at":"2026-03-17T21:08:24.267Z","repository":{"id":63042021,"uuid":"543616218","full_name":"maptiler/maptiler-geocoding-control","owner":"maptiler","description":"The Javascript \u0026 TypeScript Map Control component for MapTiler Geocoding service! Easy to be integrated into any JavaScript mapping application. ","archived":false,"fork":false,"pushed_at":"2025-02-13T18:11:58.000Z","size":1142,"stargazers_count":44,"open_issues_count":6,"forks_count":7,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-29T15:10:17.293Z","etag":null,"topics":["esm","geocoding","geocoding-api","javascript","leaflet","leaflet-plugin","leaflet-plugins","leafletjs","maplibre","maplibre-gl-js","maplibre-plugins","maptiler","maptiler-sdk-plugin","openlayers","openlayers-plugins","react","reactjs","svelte","umd"],"latest_commit_sha":null,"homepage":"https://maptiler.com/cloud/geocoding","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maptiler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-30T13:33:25.000Z","updated_at":"2025-02-05T10:45:08.000Z","dependencies_parsed_at":"2023-10-12T20:02:59.175Z","dependency_job_id":"3d5cd779-f3b5-4a7e-b905-b77afa46dc19","html_url":"https://github.com/maptiler/maptiler-geocoding-control","commit_stats":{"total_commits":217,"total_committers":4,"mean_commits":54.25,"dds":0.04608294930875578,"last_synced_commit":"274273122b8c3d0cd5992cf5182cb3eb62de17cb"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-geocoding-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-geocoding-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-geocoding-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-geocoding-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maptiler","download_url":"https://codeload.github.com/maptiler/maptiler-geocoding-control/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361695,"owners_count":20926643,"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":["esm","geocoding","geocoding-api","javascript","leaflet","leaflet-plugin","leaflet-plugins","leafletjs","maplibre","maplibre-gl-js","maplibre-plugins","maptiler","maptiler-sdk-plugin","openlayers","openlayers-plugins","react","reactjs","svelte","umd"],"created_at":"2024-09-24T19:01:53.891Z","updated_at":"2026-03-17T21:08:24.262Z","avatar_url":"https://github.com/maptiler.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.maptiler.com/cloud/geocoding/\"\u003eofficial page →\u003c/a\u003e\u003cbr\u003e\n  \u003cimg src=\"images/maptiler-logo.svg\" width=\"350px\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\" style=\"color: #AAA\"\u003e\n  The Javascript \u0026 TypeScript Map Control component for \u003ca href=\"https://www.maptiler.com/cloud/geocoding\"\u003eMapTiler Geocoding\u003c/a\u003e service! Easy to be integrated into any JavaScript mapping application.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/JS-logo.svg\" width=\"20px\"\u003e\n  \u003cimg src=\"images/TS-logo.svg\" width=\"20px\"\u003e\n  \u003cimg src=\"images/react-logo.svg\" width=\"20px\"\u003e\n  \u003cimg src=\"images/svelte-logo.svg\" width=\"20px\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/@maptiler/geocoding-control\"\u003e\u003c/img\u003e\n  \u003cimg src=\"https://img.shields.io/twitter/follow/maptiler?style=social\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n# MapTiler Search and Geocoding control for MapTiler SDK, MapLibre GL JS, Leaflet and OpenLayers\n\n## What?\n\nThe _MapTiler Geocoding control_ implements a powerful search box in your maps or online forms, enabling your application users to find any place on Earth down to individual addresses. Use the search box control with [MapTiler SDK JS](https://docs.maptiler.com/sdk-js/) (or other map libraries like [Leaflet](https://docs.maptiler.com/leaflet/), [MapLibre GL JS](https://github.com/maplibre/maplibre-gl-js), [OpenLayers](https://docs.maptiler.com/openlayers/)).\n\n## Why?\n\nThe _Geocoding control_ uses the [MapTiler Geocoding API](https://www.maptiler.com/cloud/geocoding/). You can use the API directly from your web or backend applications or use the [API Client JS](https://docs.maptiler.com/client-js/) library.\n\nWith this control, users of\nmapping application can:\n\n- Find any place on Earth (States, Cities, Streets, Addresses, POIs, ...) down\n  to the address level\n- Find and identify objects or place names using a coordinate pair or a single mouse click (reverse geocoding)\n- Restrict the search area to a specific country, bounding box, or proximity\n- Highlight searched results on the map (marker or full geometry)\n- Autocomplete words while typing\n- and much more. Check out the [Geocoding Control API reference](https://docs.maptiler.com/sdk-js/modules/geocoding/api/api-reference/#options) to see all the options.\n\nThe component can be used as an ES module or UMD module with or without bundler.\n\nGeocoding control is also provided as [React component](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/react/) and [Svelte component](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/svelte/) and [other libraries](#installation-and-more-usage-examples).\n\n## Install\n\nInstall the Geocoding control unsing `npm`:\n\n**⚠️ Warning! ⚠️**\n\nThe current version of Geocoding Control is only compatible with Svelte v4, this will potentially cause peer dependency issues when installing with certain versions of npm in Svelte projects (eg if you're using Svelte v5), or if you intend to import the Svelte component directly.\n\nIf you are using a this library in a Svelte project you can npm install with `--force` or `--legacy-peer-deps` and use only the **pre-compiled `GeoLocatControl` vanilla module**, not the Svelte component.\n\n```shell\nnpm install --save @maptiler/geocoding-control @maptiler/sdk\n```\n\n## Quick start\n\nUse the component in your mapping application:\n\n```js\nimport * as maptilersdk from \"@maptiler/sdk\";\nimport { GeocodingControl } from \"@maptiler/geocoding-control/maptilersdk\";\nimport \"@maptiler/sdk/dist/maptiler-sdk.css\";\nimport \"@maptiler/geocoding-control/style.css\";\n\nmaptilersdk.config.apiKey = \"YOUR_MAPTILER_API_KEY_HERE\";\n\nconst map = new maptilersdk.Map({\n  container: \"map\", // id of HTML container element\n});\n\nconst gc = new GeocodingControl();\n\nmap.addControl(gc);\n```\n\nNOTE: Get your personal [MapTiler API key](https://docs.maptiler.com/cloud/api/authentication-key/) in the [MapTiler Cloud](https://cloud.maptiler.com).\n\n## Installation and more usage examples\n\n- [With MapTiler SDK](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/sdk-js/)\n- [With MapLibre GL](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/maplibre-gl-js/)\n- [With Leaflet](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/leaflet/)\n- [With OpenLayers](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/openlayers/)\n- [As a React component](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/react/)\n- [As Svelte component](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/svelte/)\n- [As vanilla JavaScript module](https://docs.maptiler.com/sdk-js/modules/geocoding/api/usage/vanilla-js/)\n\n## API Documentation\n\nIn addition to the details and examples provided in this `README.md` and our documentation, check out\n\n- [The complete Geocoding service API documentation](https://docs.maptiler.com/cloud/api/geocoding/)\n- [The complete Geocoding control reference](https://docs.maptiler.com/sdk-js/modules/geocoding/api/api-reference/)\n- [UMD global variables](https://docs.maptiler.com/sdk-js/modules/geocoding/#umd-global-variables)\n\n## Development\n\n### Building\n\n```bash\nnpm install \u0026\u0026 npm run build\n```\n\nYou will find compilation result in the `dist` directory.\n\n### Running in dev mode\n\n```bash\nnpm install \u0026\u0026 VITE_API_KEY=YOUR_MAPTILER_API_KEY_HERE npm run dev\n```\n\n### POI icons and bundlers\n\nPOI icons are served from CDN per default. If there is an requirement to serve them from a different location and the control is used in the application which is built with Web Application bundler (like Webpack or Vite) then it is necessary to do some extra configuration. Icons are bundled in the library and you can find them in `node_modules/@maptiler/geocoding-control/icons`. Configure your bundler and/or provide `iconsBaseUrl` option for the icons to be properly resolved. You can also copy icons from that directory to your `public` directory.\n","funding_links":[],"categories":["Geocoding \u0026 Search Plugins"],"sub_categories":["JavaScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaptiler%2Fmaptiler-geocoding-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaptiler%2Fmaptiler-geocoding-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaptiler%2Fmaptiler-geocoding-control/lists"}