diff --git a/src/pages/DeliveryOrderDetails.css b/src/pages/DeliveryOrderDetails.css index 5f28596..94975c8 100644 --- a/src/pages/DeliveryOrderDetails.css +++ b/src/pages/DeliveryOrderDetails.css @@ -32,4 +32,27 @@ width: 100%; max-width: 800px; margin: 0 auto; +} + +.custom-marker { + background-color: white; + /* Фон для маркера */ + border-radius: 50%; + /* Круглая форма */ + border: 2px solid #007bff; + /* Граница */ + display: flex; + justify-content: center; + align-items: center; + width: 30px; + /* Ширина маркера */ + height: 30px; + /* Высота маркера */ +} + +.marker-number { + font-weight: bold; + /* Жирный текст для номера */ + color: #007bff; + /* Цвет текста */ } \ No newline at end of file diff --git a/src/pages/DeliveryOrderDetails.jsx b/src/pages/DeliveryOrderDetails.jsx index 79ca0af..2bd86ec 100644 --- a/src/pages/DeliveryOrderDetails.jsx +++ b/src/pages/DeliveryOrderDetails.jsx @@ -9,6 +9,7 @@ import { Popup, Polyline, } from "react-leaflet"; +import { DivIcon } from "leaflet"; import polyline from "@mapbox/polyline"; import "./DeliveryOrderDetails.css"; @@ -70,18 +71,18 @@ const DeliveryOrderDetails = () => {
{loading ? (
- + Загрузка...
) : (
    - {deliveryAccessories.map((accessory) => { + {deliveryAccessories.map((accessory, index) => { const coord = coordinates.find( (c) => c.city === accessory.city_name ); return (
  1. - Доставка: {accessory.name} + {index + 1}. Доставка: {accessory.name} (Город: {accessory.city_name}, Координаты:{" "} {coord @@ -92,6 +93,14 @@ const DeliveryOrderDetails = () => {
  2. ); })} +
  3. + {deliveryAccessories.length + 1}. Конечный пункт:{" "} + {DELIVERY_CITY.name} + + (Координаты: {DELIVERY_CITY.latitude}, {DELIVERY_CITY.longitude} + ) + +
{coordinates.length > 0 && (
@@ -108,12 +117,28 @@ const DeliveryOrderDetails = () => { ${index + 1}
`, + iconSize: [30, 30], + }) + } > {coord.city} ))} ${ + deliveryAccessories.length + 1 + }
`, + iconSize: [30, 30], + }) + } > {DELIVERY_CITY.name}