ValyroUI English version

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';

Пропсы

PropTypeDefault
centerLatLngMap center (controlled).
defaultCenterLatLngInitial center when uncontrolled.
onCenterChange(center: LatLng) => voidCalled with the new center when it changes.
zoomnumberZoom level, 0 (world) to 19 (street).
defaultZoomnumberInitial zoom when uncontrolled.
onZoomChange(zoom: number) => voidCalled with the new zoom when it changes.
minZoomnumber2Farthest zoom out allowed. Default 2.
maxZoomnumber18Closest zoom in allowed. Default 18.
tileUrlstring'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.
darkTileUrlstringTiles for dark color schemes; without it the light tiles are inverted.
markersMapMarker[][]Pins.
routesMapRoute[][]Polylines: a delivery route, a track.
activeMarkerstring | nullMarker whose popup is open (controlled).
defaultActiveMarkerstring | nullInitial activeMarker when uncontrolled.
onActiveMarkerChange(id: string | null) => voidCalled with the new activeMarker when it changes.
heightnumber | string420CSS height of the map. Default 420px.
controlsbooleantrueZoom 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.
childrenReactNodeOverlay content: a route card, a search box. Position it yourself.
labelsPartial<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 · Весь раздел «Графики и аналитика»