Bay Location Map

Esri, Maxar, OpenStreetMap

Would you like to see the house before you book?

Ring the front desk any day between eight in the morning and midnight.

+30 22840 41200Directions to the house
About this block

Bay Location MapPRO

A contact-and-location section on a real map: street and satellite tiles with a style switch, dragging, double-click and keyboard zoom that glides between levels, a pin for the hotel that drops in, icon markers for nearby beaches and stops that center the map when clicked, and a dark contact card with a large phone number and a directions link. Built without a map library.

Hotel30: Bay Location Map

A draggable map of the area around the hotel, with a pin that drops in for the house, icon markers for nearby places that center the map when clicked, a street and satellite switch, gliding zoom, and a dark contact card with a large phone number and a directions link, all without a map library.

Upgrade to Pro

Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.

Upgrade Now

Installation

Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.

Radix flavor

bash
npx shadcn add "https://beste.dev/r/hotel30?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://beste.dev/r-base/hotel30?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/hotel30.tsx. It has no other beste components or shadcn/ui primitives to pull in: the map, its controls and the contact card are all inside the one file.

Quick start

The installed file exports hotel30Demo alongside the block: the exact props behind the preview above. Spread it to get a working section in one line.

tsx
import { Hotel30, hotel30Demo } from "@/components/beste/block/hotel30";

export default function Page() {
  return <Hotel30 {...hotel30Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Hotel30 } from "@/components/beste/block/hotel30";
import { Anchor, BusFront, Umbrella } from "lucide-react";

export default function Page() {
  return (
    <Hotel30
      home={{ name: "Ostria", lat: 37.12053, lng: 25.22779 }}
      center={{ lat: 37.12029, lng: 25.22564, zoom: 15 }}
      places={[
        { name: "Old harbor", icon: Anchor, lat: 37.12481, lng: 25.23637 },
        { name: "Piperi beach", icon: Umbrella, lat: 37.12532, lng: 25.24495 },
        { name: "Bus to Parikia", icon: BusFront, lat: 37.11796, lng: 25.23465 },
      ]}
      styles={[
        {
          label: "Map",
          url: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}",
          maxZoom: 16,
          invertInDark: true,
        },
        {
          label: "Satellite",
          url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
          maxZoom: 18,
        },
      ]}
      attribution="Esri, Maxar, OpenStreetMap"
      card={{
        heading: "Would you like to see the house before you book?",
        body: "Ring the front desk any day between eight in the morning and midnight.",
        phone: { label: "+30 22840 41200", href: "tel:+302284041200" },
        link: { label: "Directions to the house", href: "https://www.google.com/maps/dir/?api=1&destination=37.12053,25.22779" },
      }}
      labels={{ zoomIn: "Zoom in", zoomOut: "Zoom out", reset: "Back to the house", map: "Map of Naoussa bay", styles: "Map style" }}
    />
  );
}

Props

PropTypeDefaultDescription
homeHome–The hotel pin, with its name in a pill above the point
centerCenter–Starting view; falls back to home at zoom 15
placesPlace[][]Icon markers for nearby spots
stylesMapStyle[][]Tile sources; a switch appears when there are two or more
attributionstring–Tile credit in the bottom right corner
cardContactCard–Dark contact card over the map
labelsLabels{}Accessible labels for the map and its controls
classNamestring–Extra classes for the outer <section>
ts
import type { LucideIcon } from "lucide-react";

type Home = {
  name: string;
  lat: number;
  lng: number;
};

type Center = {
  lat: number;
  lng: number;
  zoom: number;
};

type Place = {
  name: string;
  icon: LucideIcon;
  lat: number;
  lng: number;
};

type MapStyle = {
  label: string;
  url: string; // with {z}, {x} and {y} placeholders
  maxZoom: number;
  invertInDark?: boolean;
};

type ContactCard = {
  heading: string;
  body: string;
  phone: { label: string; href: string };
  link?: { label: string; href: string };
};

type Labels = {
  zoomIn?: string;
  zoomOut?: string;
  reset?: string;
  map?: string;
  styles?: string;
};

Behavior notes

  • The map is plain Web Mercator tiles laid out by the block: it fetches one zoom level deeper than shown (capped at the style's maxZoom) so tiles stay sharp on dense screens, and each tile fades in once loaded. Zoom is clamped between 12 and 17.
  • Drag to pan with the pointer (touch included); double-click zooms in on the point under the cursor; with the map focused, the arrow keys pan by 120px and +, = or - zoom. The side buttons zoom in, zoom out and return to the starting view.
  • Zooming, panning by key and clicking a place glide over 0.9s: the old tiles scale and slide while the new ones load underneath. Starting a drag cancels a glide in progress.
  • Clicking a place marker centers the map on it at the current zoom. Place names show under every marker from the medium breakpoint and only on hover or focus below it.
  • A style with invertInDark is inverted and hue-rotated in dark mode, which turns a light gray street map dark; satellite imagery is left as is.
  • The home pin drops in once when the map enters the view and pulses unless reduced motion is on, which also turns the glides into instant jumps.
  • The contact card overlays the bottom left of the map from the medium breakpoint and sits under it on phones; the map is 4:5, then 4:3, then 16:9 as the screen widens.

More Hotel blocks

View all Hotel
PRO

hotel15

Getting Here Aerial Map

PRO

hotel31

Memory Line and Photo Wave

PRO

hotel47

Getting Here Ways

Get Pro