Dev Helpers
← Back

Equirectangular map pin

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

Open this example in the interactive library

Live preview

Source code

// components/EquirectangularMapPin.tsx

export default function EquirectangularMapPin({
  lat = 43.65,
  lon = -79.38,
}: { lat?: number; lon?: number } = {}) {
  return (
    <svg viewBox="0 0 360 180" role="img" aria-label={"Location " + lat + ", " + lon}>
      <rect width="360" height="180" fill="#d8e8dc" />
      <circle cx={lon + 180} cy={90 - lat} r="4" fill="#863e24" />
    </svg>
  );
}