location-picker skill
A skill that teaches an agent to add a map point picker to a form: a web component, a coordinates field, keyless OpenStreetMap.
- 82 ★ on the repository
- Last commit
- MIT
Minimal access
Why this level
- The skill only describes integration, while the component in the browser may ask for geolocation after a tap and calls map services.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/location-pickerDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The skill only describes integration, while the component in the browser may ask for geolocation after a tap and calls map services.
This is third-party code. Review the repository files before installing.
What it does
location-picker is an npm package with the `<location-picker>` web component and the `LocationPicker` class, shipped with an Agent Skill. A user pans the map under a fixed pin, searches for a place, pastes coordinates or taps a locate button, and the form submits a value like `location=48.85837,2.294481`. The skill guides the agent through the task: connecting the component to a plain HTML form, to React, Vue, Angular, Svelte, Solid and Preact, and to hidden `lat` and `lng` inputs in Laravel, Django, Rails, jQuery, Livewire, Alpine and htmx. It covers map providers (OpenStreetMap by default, Google Maps, MapLibre), address search, reverse geocoding, parsing coordinates from text and links, CSP rules, server rendering and migration from versions 1.x and 2.x. A pick link also lets a person choose a point with nothing installed.
Who it is for. Web developers whose form needs one precise map point: a branch, a pickup spot, an event venue or an address in a profile.
Good fit when
- A store admin needs to pick branch coordinates and submit them with the form.
- At checkout a customer sets a delivery pin on a phone, and the value changes only after confirmation.
- An agent must add the picker to a React, Vue or Laravel project and bind the value correctly.
- A bot or agent asks a person for a place and receives the point through a pick link with nothing to install.
Not a fit when
- You need routes, areas or several markers: the component picks one point.
- You need offline maps or a native React Native app.
- You need text-only address autocomplete with no map.
Example request
Add a delivery point picker to the order form through location-picker, submit coordinates in a `location` field and check the binding in React.Limitations
Free OpenStreetMap tiles and Photon search have no SLA, so production load needs your own tiles and geocoder. The CDN script should be pinned to `@3`. If the page has no Leaflet, it is loaded from jsDelivr, and CSP rules must allow the needed addresses. The locate button asks for browser permission only after a tap. The package has no runtime dependencies: Leaflet, MapLibre and Google Maps types stay optional. The skill helps with integration code, but map, tile and address search quality depend on the providers you pick.
How to disable. Delete the `skills/location-picker` folder from the agent skills directory. In the project remove the `script` tag or the package with `npm uninstall location-picker`.
FAQ
How do I connect the skill to an agent?
Run `npx skills add cyphercodes/location-picker`. The same file ships in the npm package at `node_modules/location-picker/skills/location-picker/SKILL.md`.
Do I need a map key?
No, OpenStreetMap through Leaflet works by default. Google Maps and MapLibre are optional.
In what form does the form submit coordinates?
As one `lat,lng` field (`name` attribute), as two fields (`lat-name` and `lng-name`) or into existing hidden inputs through `lat-input` and `lng-input`.
How do I ask a person for a point with nothing to install?
Send the pick link: the person marks a place on a map and you receive it as text, an `https://` redirect or a `postMessage` to your origin.
Is there migration help for old versions?
Yes. The skill knows versions 1.x and 2.x (`locationPicker`, `getMarkerPosition`, `setCurrentPosition`), and `location-picker/v1` keeps the old call.
Discussion
No questions or reviews yet.
Related
SkillsA reference and recipe skill for the Yandex Maps JS API v3: markers, clustering, search, geocoding and React/Next.js, plus the coordinate-order gotcha
MapLibre Agent Skills guides agents through map sources, labels, icons, terrain and migrations in MapLibre applications.
Nuxt UI v4 skill: an agent builds Vue and Nuxt interfaces, picks components, sets up the theme and lays out forms and dashboards
A Codex skill that creates runnable Vue projects with a 3D Earth, administrative maps, MapLibre overlays and contour terrain
A skill that points the agent to ready VueUse composables for Vue 3 and Nuxt, with a usage and type reference for each function
Official Claude Code plugin from the Next.js repo: adopting Cache Components and Partial Prefetching, and verifying changes on a running dev server
README in short
The README starts with a one-tag minimal example, then shows installation, integrations, providers, a phone field mode, the pick link, error codes and a section for agents with llms.txt, WebMCP and the skill.
README badge
Original SKILL.md
---
name: location-picker
description: >-
Add a map location picker to a web form or web app with the location-picker npm package (the
<location-picker> web component and the LocationPicker JavaScript class). Use it when a user must choose one
precise latitude/longitude point on a map, such as a store, branch or sensor location, a delivery or pickup pin,
an event venue, the place of a report or a home address, and the point must be submitted with a form, bound in
React, Vue, Angular, Svelte, Solid or Preact, or written into hidden lat/lng inputs (Laravel, Django, Rails,
jQuery, Livewire, Alpine, htmx). Covers the keyless OpenStreetMap default, Google Maps and MapLibre providers,
address search, reverse geocoding, a locate-me button, parsing coordinates from text or map URLs, Content
Security Policy, SSR and hydration, a phone-first field mode, the hosted pick link that asks a person for a
location by URL, and upgrading location-picker 1.x or 2.x code (global locationPicker, getMarkerPosition,
setCurrentPosition).
license: MIT
metadata:
homepage: https://cyphercodes.github.io/location-picker/
repository: https://github.com/cyphercodes/location-picker
---
# location-picker
`location-picker` captures one precise point: the user pans a map under a fixed centre pin (or searches, pastes coordinates, or taps "Use my location"), and the page gets `"lat,lng"`. It ships a form-associated custom element, `<location-picker>`, and an imperative class, `LocationPicker`. The default map is OpenStreetMap through Leaflet, with no API key.
Do not use it for drawing shapes or routes, several markers, a full mapping application, or text-only address autocomplete.
## Steps
1. **Pick the entry point.**
- No bundler: `<script src="https://cdn.jsdelivr.net/npm/location-picker@3"></script>` (keep the `@3`). It defines `<location-picker>` and `window.LocationPicker`.
- Bundler: `npm i location-picker`, then `import 'location-picker'` once in client code. It defines the element and is a no-op on the server.
- Need the engine map synchronously, or no custom element: `import { LocationPicker } from 'location-picker/core'`.
2. **Wire the value.** In a form, use `name` (one `"lat,lng"` field), `lat-name` + `lng-name` (two fields), or `lat-input` + `lng-input` (fill inputs the page already has). In a framework, bind `value` and update state from `change` (committed); use `input` only to display live updates, and never write the value back from an `input` listener (in 3.0 that stops a pan in progress). Use the per-framework event names below.
3. **Choose the provider.** Leave it out for OpenStreetMap. For Google Maps add `provider="google" api-key="YOUR_BROWSER_KEY"`. For MapLibre, the project must provide `maplibre-gl` and its CSS.
4. **Choose the presentation.** Default inline (the map in the page). For checkout, delivery or sign-up forms that people fill in on phones, use `presentation="auto"`: a compact field with a "Choose on map" button on phones, the inline map elsewhere. In field mode `ready` resolves at the first open, so never gate the form on `el.ready`.
5. **Add features only when asked:** `search`, `reverse-geocode` (with `address-name` or `addresschange`), `locate="button"`, `required`, `center` and `zoom`.
6. **Check the result against "Common mistakes"** before you finish.
If the user has no code at all (WordPress, Webflow, Squarespace, Shopify, a Formspree or Netlify form), point them to the snippet generator at https://cyphercodes.github.io/location-picker/embed/ and the platform guide https://github.com/cyphercodes/location-picker/blob/master/docs/embed.md. If an agent or a bot only needs to ask a person for a location, use the pick link (below) instead of building a page.
## Plain HTML
<!-- prettier-ignore-start -->
```html
<!doctype html>
<html lang="en">