{"id":15676986,"url":"https://github.com/soal/vue-mapbox-geocoder","last_synced_at":"2025-04-15T05:52:06.026Z","repository":{"id":32640979,"uuid":"138502791","full_name":"soal/vue-mapbox-geocoder","owner":"soal","description":"Wrapper for vue-mapbox-geocoder","archived":false,"fork":false,"pushed_at":"2023-01-03T15:18:17.000Z","size":1389,"stargazers_count":13,"open_issues_count":34,"forks_count":21,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T05:52:01.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-24T17:39:41.000Z","updated_at":"2023-04-15T11:50:26.000Z","dependencies_parsed_at":"2023-01-14T21:48:26.238Z","dependency_job_id":null,"html_url":"https://github.com/soal/vue-mapbox-geocoder","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fvue-mapbox-geocoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fvue-mapbox-geocoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fvue-mapbox-geocoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soal%2Fvue-mapbox-geocoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soal","download_url":"https://codeload.github.com/soal/vue-mapbox-geocoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016317,"owners_count":21198832,"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":[],"created_at":"2024-10-03T16:07:57.568Z","updated_at":"2025-04-15T05:52:06.008Z","avatar_url":"https://github.com/soal.png","language":"JavaScript","readme":"# Vue-mapbox-geocoder\n\n[Vue-mapbox](https://github.com/soal/vue-mapbox) plugin for [mapbox-gl-geocoder](https://github.com/mapbox/mapbox-gl-geocoder) support.\n\n## Usage\n\nFirst of all you need to install Mapbox GL and Vue-mapbox. [See vue-mapbox doc](https://soal.github.io/vue-mapbox/#/quickstart)\n\nInstall mabbox-gl-geocoder and vue-mapbox-geocoder:\n\n```bash\nnpm i @mapbox/mapbox-gl-geocoder vue-mapbox vue-mapbox-geocoder\n```\n\nNow you can add geocoder control like other controls:\n\n```vue\n\u003ctemplate\u003e\n  \u003cMglMap\n    :accessToken=\"accessToken\"\n    :mapStyle=\"mapStyle\"\n  \u003e\n    \u003cMglGeocoderControl\n      \u003c-- props needed for GeolocateControl --\u003e\n      :accessToken=\"accessToken\"\n      :input.sync=\"defaultInput\"\n      @results=\"handleSearch\"\n    /\u003e\n  \u003c/MglMap\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport {\n  MglMap,\n  MglNavigationControl,\n  MglGeolocateControl\n} from 'vue-mapbox'\n\nimport MglGeocoderControl from 'vue-mapbox-geocoder'\n\nexport default {\n  name: 'App',\n\n  components: {\n    MglMap,\n    MglGeocoderControl\n  },\n  data() {\n    return {\n      accessToken: 'YOUR_ACCESS_TOKEN',\n      mapStyle: 'YOUR_MAP_STYLE',\n      defaultInput: 'Bodhgaya'\n    }\n  },\n  methods: {\n    handleSearch(event) {\n      console.log(event)\n    }\n  }\n}\n\u003c/script\u003e\n```\n\nOptions for mapbox-gl-geocoder described [here](https://github.com/mapbox/mapbox-gl-geocoder/blob/master/API.md) can be passed via props.\n\nAdditionaly you can pass syncronized prop `input` as in example below.\nIt will be passed to mapbox-gl-geocoder as default input value.\nEach time you change value of this prop, mapbox-gl-geocoder `.setInput` method is called.\n\nSame for `proximity` prop that internally invokes mapbox-gl-geocoder `setProximity` method.\n\nAlso you can call `query` method to query search and get results programmatically.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoal%2Fvue-mapbox-geocoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoal%2Fvue-mapbox-geocoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoal%2Fvue-mapbox-geocoder/lists"}