diff --git a/public/images/arrow.svg b/public/images/arrow.svg new file mode 100644 index 0000000..ea28122 --- /dev/null +++ b/public/images/arrow.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/logos/jw.png b/public/images/logos/jw.png new file mode 100644 index 0000000..08f0628 Binary files /dev/null and b/public/images/logos/jw.png differ diff --git a/public/images/logos/lgo.png b/public/images/logos/lgo.png new file mode 100644 index 0000000..a3b40bf Binary files /dev/null and b/public/images/logos/lgo.png differ diff --git a/public/images/logos/pedals.png b/public/images/logos/pedals.png new file mode 100644 index 0000000..8a2d62d Binary files /dev/null and b/public/images/logos/pedals.png differ diff --git a/public/images/logos/pin-mix.png b/public/images/logos/pin-mix.png new file mode 100644 index 0000000..ea139d7 Binary files /dev/null and b/public/images/logos/pin-mix.png differ diff --git a/public/images/logos/privet.png b/public/images/logos/privet.png new file mode 100644 index 0000000..5746fa8 Binary files /dev/null and b/public/images/logos/privet.png differ diff --git a/public/images/logos/prokatimsya.png b/public/images/logos/prokatimsya.png new file mode 100644 index 0000000..975d767 Binary files /dev/null and b/public/images/logos/prokatimsya.png differ diff --git a/public/images/logos/rider.png b/public/images/logos/rider.png new file mode 100644 index 0000000..6dacdf0 Binary files /dev/null and b/public/images/logos/rider.png differ diff --git a/public/images/logos/rider_evening.png b/public/images/logos/rider_evening.png new file mode 100644 index 0000000..417bf9e Binary files /dev/null and b/public/images/logos/rider_evening.png differ diff --git a/src/constants/logos.ts b/src/constants/logos.ts index ae6c076..9085ac0 100644 --- a/src/constants/logos.ts +++ b/src/constants/logos.ts @@ -4,13 +4,13 @@ export interface ILogos { export const LOGOS = { default: ['Без лого', null, 'bottom-right'], - nvs: ['НВС', require('../sprites/logos/lgo.png'), 'bottom-right'], - pinmix: ['Пин-Микс', require('../sprites/logos/pin-mix.png'), 'top-right'], - jolly: ['Пин-Микс + JW', require('../sprites/logos/jw.png'), 'top-right'], - pedals: ['Усталые Педальки', require('../sprites/logos/pedals.png'), 'bottom-right'], - rider: ['Райдер', require('../sprites/logos/rider.png'), 'bottom-right'], - rider_evening: ['Вечерние городские', require('../sprites/logos/rider_evening.png'), 'top-right'], - prokatimsya: ['PRO_КАТИМСЯ?!', require('../sprites/logos/prokatimsya.png'), 'top-right'], + nvs: ['НВС', '/images/logos/lgo.png', 'bottom-right'], + pinmix: ['Пин-Микс', '/images/logos/pin-mix.png', 'top-right'], + jolly: ['Пин-Микс + JW', '/images/logos/jw.png', 'top-right'], + pedals: ['Усталые Педальки', '/images/logos/pedals.png', 'bottom-right'], + rider: ['Райдер', '/images/logos/rider.png', 'bottom-right'], + rider_evening: ['Вечерние городские', '/images/logos/rider_evening.png', 'top-right'], + prokatimsya: ['PRO_КАТИМСЯ?!', '/images/logos/prokatimsya.png', 'top-right'], }; export const DEFAULT_LOGO = 'nvs'; diff --git a/src/constants/stickers.ts b/src/constants/stickers.ts index db6d399..62685b0 100644 --- a/src/constants/stickers.ts +++ b/src/constants/stickers.ts @@ -37,7 +37,7 @@ export interface IStickers { export const STICKERS: IStickers = { base: { title: 'Простые', - url: require('~/sprites/stickers/stickers-base.svg'), + url: '/images/stickers-base.svg', size: 72, layers: { men: { off: 5, title: 'Александр 3', title_long: 'Парк Городское Начало' }, @@ -69,7 +69,7 @@ export const STICKERS: IStickers = { }, real: { title: 'Реалистичные', - url: require('~/sprites/stickers/stickers-base.svg'), + url: '/images/stickers-base.svg', size: 72, layers: { chicken: { off: 31, title: 'Курочка', title_long: 'Курочка' }, @@ -84,7 +84,7 @@ export const STICKERS: IStickers = { }, pin: { title: 'ПИН-микс', - url: require('~/sprites/stickers/stickers-base.svg'), + url: '/images/stickers-base.svg', size: 72, layers: { start: { off: 21, title: '1', title_long: 'Первая точка' }, @@ -101,7 +101,7 @@ export const STICKERS: IStickers = { }, points: { title: 'Точки', - url: require('~/sprites/stickers/stickers-base.svg'), + url: '/images/stickers-base.svg', size: 72, layers: { pt1: { off: 40, title: '1', title_long: 'Первая точка' }, diff --git a/src/utils/arrow.ts b/src/utils/arrow.ts index ccf7586..9577d92 100644 --- a/src/utils/arrow.ts +++ b/src/utils/arrow.ts @@ -1,6 +1,6 @@ -import { divIcon, LatLngLiteral, Marker, marker, DivIcon } from 'leaflet'; +import { divIcon, DivIcon, LatLngLiteral, Marker } from 'leaflet'; -const arrow_image = require('~/sprites/arrow.svg'); +const arrow_image = '/images/arrow.svg'; export const createArrowIcon = (angle: number) => divIcon({ diff --git a/src/utils/marks.ts b/src/utils/marks.ts index 161ee6c..f3df6cf 100644 --- a/src/utils/marks.ts +++ b/src/utils/marks.ts @@ -1,9 +1,10 @@ -import { divIcon, LatLngLiteral, Layer, LayerGroup, Map, marker, Marker } from 'leaflet'; +import { divIcon, LatLngLiteral, LayerGroup, Map, marker, Marker } from 'leaflet'; import { arrowClusterIcon } from '~/utils/arrow'; import { MarkerClusterGroup } from 'leaflet.markercluster/dist/leaflet.markercluster-src.js'; import { allwaysPositiveAngleDeg, angleBetweenPoints, distKmHaversine } from '~/utils/geom'; import classNames from 'classnames'; -const arrow_image = require('~/sprites/arrow.svg'); + +const arrow_image = '/images/arrow.svg'; interface KmMarksOptions { showStartMarker: boolean; diff --git a/src/utils/renderer.ts b/src/utils/renderer.ts index b9d02bc..506b4b6 100644 --- a/src/utils/renderer.ts +++ b/src/utils/renderer.ts @@ -231,7 +231,7 @@ export const composeArrows = async ({ points: Point[]; ctx: CanvasRenderingContext2D; }): Promise => { - const image = await imageFetcher(require('~/sprites/arrow.svg')); + const image = await imageFetcher('/images/arrow.svg'); const distances = points.map( (point, i) => (points[i + 1] && findDistancePx(points[i], points[i + 1])) || 0