Tile Map
Лёгкая карта на тайлах: метки, маршрут, всплывающие карточки, зум. Pro · Графики и аналитика › Карты и матрицы
Установка
npx valyro-cli@latest login
npx valyro-cli@latest add tile-map
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { TileMap } from 'valyro-ui-pro';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
center | LatLng | Map center (controlled). | |
defaultCenter | LatLng | Initial center when uncontrolled. | |
onCenterChange | (center: LatLng) => void | Called with the new center when it changes. | |
zoom | number | Zoom level, 0 (world) to 19 (street). | |
defaultZoom | number | Initial zoom when uncontrolled. | |
onZoomChange | (zoom: number) => void | Called with the new zoom when it changes. | |
minZoom | number | 2 | Farthest zoom out allowed. Default 2. |
maxZoom | number | 18 | Closest zoom in allowed. Default 18. |
tileUrl | string | 'https://tile.openstreetmap.org/{z}/{x}/{y}.png' | Raster tile template with {z}, {x}, {y} and optional {s} (a, b, c) and {r} (@2x). Default: OpenStreetMap. |
darkTileUrl | string | Tiles for dark color schemes; without it the light tiles are inverted. | |
markers | MapMarker[] | [] | Pins. |
routes | MapRoute[] | [] | Polylines: a delivery route, a track. |
activeMarker | string | null | Marker whose popup is open (controlled). | |
defaultActiveMarker | string | null | Initial activeMarker when uncontrolled. | |
onActiveMarkerChange | (id: string | null) => void | Called with the new activeMarker when it changes. | |
height | number | string | 420 | CSS height of the map. Default 420px. |
controls | boolean | true | Zoom and full-screen buttons. Default true. |
scrollZoom | 'modifier' | 'always' | 'modifier' | modifier: the wheel zooms only with Ctrl / ⌘ (the page keeps scrolling); always: it always zooms. |
children | ReactNode | Overlay content: a route card, a search box. Position it yourself. | |
labels | Partial<TileMapLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Похожие компоненты
- Heatmap — Тепловые карты
- Map Chart — Карта мира: хороплет и точки, зум и панорамирование
- Cohort Retention Matrix — Удержание по когортам: тепловая таблица, средние, аномалии и заметки
- Line Chart — Линейные графики
- Bar Chart — Столбчатые диаграммы
- Area Chart — Графики с заливкой
- Scatter Chart — Точечные и пузырьковые диаграммы с линией тренда
- Sparkline — Мини-графики
- Confidence Band Chart — Прогноз с доверительными интервалами и выбросами, точки читаются с клавиатуры
- Candlestick Chart — Биржевые свечи с объёмами и скользящими средними
- Donut Chart — Кольцевые диаграммы
- Treemap — Иерархии площадями с переходом по уровням
Назад: Map Chart · Далее: Cohort Retention Matrix · Весь раздел «Графики и аналитика»