update how it works card update
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
* Kept dependency-free (no Leaflet runtime import) so it can be safely consumed
|
||||
* by both server and client modules. Types model `[lat, lng]` tuples that are
|
||||
* directly compatible with Leaflet's `LatLngExpression`.
|
||||
*
|
||||
* Coordinates are the real Doormile operational sites, verified against
|
||||
* satellite view — not generic city-centre points.
|
||||
*/
|
||||
|
||||
/** A `[latitude, longitude]` coordinate pair. */
|
||||
@@ -12,21 +15,56 @@ export type LatLng = [number, number];
|
||||
export interface OfficeLocation {
|
||||
/** Stable, unique key (used for React keys + analytics). */
|
||||
readonly id: string;
|
||||
/** Short city label, shown on the navigation buttons. */
|
||||
/** Short city label, shown on the navigation button. */
|
||||
readonly city: string;
|
||||
/** Human-readable label shown in the marker popup + a11y fallback. */
|
||||
/** Human-readable label shown in the a11y fallback + marker title. */
|
||||
readonly name: string;
|
||||
/** Compact heading shown in the marker tooltip/popup (e.g. "Hyderabad HQ"). */
|
||||
readonly shortLabel: string;
|
||||
/** `[latitude, longitude]`. */
|
||||
readonly position: LatLng;
|
||||
/** Headquarters gets the largest, glowing, default-active marker. */
|
||||
readonly isHeadquarters?: boolean;
|
||||
}
|
||||
|
||||
/** The three permanent office markers, ordered north-to-south is irrelevant — bounds are auto-fit. */
|
||||
/**
|
||||
* The three permanent office markers, ordered for the navigation row by
|
||||
* operational hierarchy: Hyderabad (HQ) → Bengaluru → Coimbatore. The
|
||||
* headquarters is conveyed purely through styling (active state + border +
|
||||
* glow), not through icons or label text.
|
||||
*/
|
||||
export const OFFICE_LOCATIONS: readonly OfficeLocation[] = [
|
||||
{ id: "coimbatore", city: "Coimbatore", name: "Coimbatore Office", position: [11.0168, 76.9558] },
|
||||
{ id: "bengaluru", city: "Bengaluru", name: "Bengaluru Office", position: [12.9716, 77.5946] },
|
||||
{ id: "hyderabad", city: "Hyderabad", name: "Hyderabad Office", position: [17.385, 78.4867] },
|
||||
{
|
||||
id: "hyderabad",
|
||||
city: "Hyderabad",
|
||||
name: "Doormile Headquarters",
|
||||
shortLabel: "Hyderabad HQ",
|
||||
// Vision Ultima, Jayabheri Enclave, Gachibowli — verified on satellite.
|
||||
position: [17.4484, 78.3573],
|
||||
isHeadquarters: true,
|
||||
},
|
||||
{
|
||||
id: "bengaluru",
|
||||
city: "Bengaluru",
|
||||
name: "Bengaluru Hub",
|
||||
shortLabel: "Bengaluru Hub",
|
||||
// Resolved from the supplied Google Maps share link — verified on satellite.
|
||||
position: [12.9929351, 77.6988599],
|
||||
},
|
||||
{
|
||||
id: "coimbatore",
|
||||
city: "Coimbatore",
|
||||
name: "Coimbatore Hub",
|
||||
shortLabel: "Coimbatore Hub",
|
||||
// Mayflower Valencia, Coimbatore — verified against satellite view.
|
||||
position: [11.0191, 76.9883],
|
||||
},
|
||||
];
|
||||
|
||||
/** The headquarters office — focused by default on load. Falls back to the first office. */
|
||||
export const HQ_OFFICE: OfficeLocation =
|
||||
OFFICE_LOCATIONS.find((office) => office.isHeadquarters) ?? OFFICE_LOCATIONS[0];
|
||||
|
||||
export interface TileLayerConfig {
|
||||
readonly url: string;
|
||||
readonly attribution: string;
|
||||
@@ -45,15 +83,12 @@ export const ESRI_WORLD_IMAGERY: TileLayerConfig = {
|
||||
maxZoom: 19,
|
||||
};
|
||||
|
||||
/** Padding (in px) applied when auto-fitting bounds so markers never touch the edges. */
|
||||
export const MAP_FIT_PADDING: LatLng = [50, 50];
|
||||
|
||||
/** Cap the auto-fit zoom so two close offices don't zoom the map in too far. */
|
||||
export const MAP_FIT_MAX_ZOOM = 7;
|
||||
|
||||
/** City-level zoom used when a single office is selected via the nav buttons. */
|
||||
/** City-level zoom used when an office is selected (and for the initial HQ view). */
|
||||
export const MAP_FOCUS_ZOOM = 13;
|
||||
|
||||
/** Initial center/zoom (roughly the centroid of the offices) used before bounds are fit. */
|
||||
export const MAP_INITIAL_CENTER: LatLng = [14.0, 77.7];
|
||||
export const MAP_INITIAL_ZOOM = 5;
|
||||
/**
|
||||
* Initial center/zoom: the experience opens focused on the Hyderabad HQ so the
|
||||
* command-centre reads as the heart of the network the instant the map paints.
|
||||
*/
|
||||
export const MAP_INITIAL_CENTER: LatLng = HQ_OFFICE.position;
|
||||
export const MAP_INITIAL_ZOOM = MAP_FOCUS_ZOOM;
|
||||
|
||||
Reference in New Issue
Block a user