⚠️ Early Stage Project: This library is not production-ready yet. Developers should use it with caution and expect breaking changes.

Image

Overlay images on specific map coordinates.

Installation

First, make sure you have the base map component installed:

npx shadcn@latest add https://terrae.vercel.app/maps/map.json

Then install the image component:

npx shadcn@latest add https://terrae.vercel.app/maps/map-image.json

Basic Example

Add an image overlay to your map by specifying the image URL and the four corner coordinates.

Custom Opacity

Control the transparency of the image overlay using the opacity prop.

Properties

PropertyTypeDefaultDescription
idstringrequiredUnique identifier for the image layer
urlstringrequiredURL of the image to overlay
coordinatesMapImageCornersrequiredFour corner coordinates (top-left, top-right, bottom-right, bottom-left)
opacitynumber1Image opacity (0-1)