Dev Helpers
← Back

Geo URI anchor

Import and render <GeoURIAnchor /> in a React project.

Open this example in the interactive library

Live preview

Source code

// components/GeoURIAnchor.tsx

export default function GeoURIAnchor({
  lat = 43.65,
  lon = -79.38,
}: { lat?: number; lon?: number } = {}) {
  return <a href={"geo:" + lat + "," + lon}>Open coordinates in maps</a>;
}