mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
printing gpx tracks
This commit is contained in:
parent
5604d8716b
commit
f41078b769
4 changed files with 40 additions and 8 deletions
|
@ -118,6 +118,7 @@ function* getRenderData() {
|
|||
yield put(editorSetRenderer({ info: 'Загрузка тайлов', progress: 0.1 }));
|
||||
|
||||
const { route, stickers, provider }: ReturnType<typeof selectMap> = yield select(selectMap);
|
||||
const gpx: ReturnType<typeof selectEditorGpx> = yield select(selectEditorGpx);
|
||||
const { distance }: ReturnType<typeof selectEditor> = yield select(selectEditor);
|
||||
|
||||
const canvas = <HTMLCanvasElement>document.getElementById('renderer');
|
||||
|
@ -137,6 +138,20 @@ function* getRenderData() {
|
|||
|
||||
yield composeImages({ geometry, images, ctx });
|
||||
yield composePoly({ points, ctx });
|
||||
|
||||
gpx.list.forEach(item => {
|
||||
if (!gpx.enabled || !item.enabled || !item.latlngs.length) return;
|
||||
|
||||
composePoly({
|
||||
points: getPolyPlacement(item.latlngs),
|
||||
ctx,
|
||||
color: item.color,
|
||||
opacity: 0.5,
|
||||
weight: 9,
|
||||
dash: [12, 12],
|
||||
});
|
||||
});
|
||||
|
||||
yield composeArrows({ points, ctx });
|
||||
yield composeDistMark({ ctx, points, distance });
|
||||
yield composeStickers({ stickers: sticker_points, ctx });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue