From cd082ba073299d4d463b3430e042128f74996c3a Mon Sep 17 00:00:00 2001 From: panaaj <38519157+panaaj@users.noreply.github.com> Date: Sat, 13 Jan 2024 16:57:54 +1030 Subject: [PATCH] startline icon --- src/app/modules/map/mapconfig.ts | 6 +++--- .../ol/lib/resources/layer-routes.component.ts | 13 ++++++++----- src/assets/img/startboat.png | Bin 0 -> 6235 bytes 3 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 src/assets/img/startboat.png diff --git a/src/app/modules/map/mapconfig.ts b/src/app/modules/map/mapconfig.ts index d0484505..38096dba 100644 --- a/src/app/modules/map/mapconfig.ts +++ b/src/app/modules/map/mapconfig.ts @@ -97,10 +97,10 @@ export const routeStyles = { }), startBoat: new Style({ image: new Icon({ - src: './assets/img/startflag.png', + src: './assets/img/startboat.png', rotateWithView: false, - scale: 0.5, - anchor: [22.5, 45], + scale: 0.15, + anchor: [24, 160], anchorXUnits: 'pixels', anchorYUnits: 'pixels' }), diff --git a/src/app/modules/map/ol/lib/resources/layer-routes.component.ts b/src/app/modules/map/ol/lib/resources/layer-routes.component.ts index 64d63cc6..080b3503 100644 --- a/src/app/modules/map/ol/lib/resources/layer-routes.component.ts +++ b/src/app/modules/map/ol/lib/resources/layer-routes.component.ts @@ -15,6 +15,7 @@ import VectorLayer from 'ol/layer/Vector'; import VectorSource from 'ol/source/Vector'; import { Style, Stroke, Text, Fill, Circle } from 'ol/style'; import { LineString, Point } from 'ol/geom'; +import { fromLonLat } from 'ol/proj'; import { MapComponent } from '../map.component'; import { Extent } from '../models'; import { fromLonLatArray, mapifyCoords } from '../util'; @@ -184,18 +185,20 @@ export class RouteLayerComponent implements OnInit, OnDestroy, OnChanges { const sfla: Feature[] = []; // start line - if (rte.feature.properties.startLine) { - const sla = fromLonLatArray(rte.feature.properties.startLine); + if (rte.feature.properties.startLine && rte.feature.properties.startLine.pin + && rte.feature.properties.startLine.boat) { + const slp = fromLonLat(rte.feature.properties.startLine.pin); + const slb = fromLonLat(rte.feature.properties.startLine.boat); const sl = new Feature({ - geometry: new LineString(sla) + geometry: new LineString([slp,slb]) }); sl.setId('startline'); sl.setStyle(this.buildStartFinishLineStyle('startLine')); sfla.push(sl); const sp = new Feature({ - geometry: new Point(sla[0]), + geometry: new Point(slp), name: 'Start Pin' }); sp.setId('startline.pin'); @@ -203,7 +206,7 @@ export class RouteLayerComponent implements OnInit, OnDestroy, OnChanges { sfla.push(sp); const sb = new Feature({ - geometry: new Point(sla[1]), + geometry: new Point(slb), name: 'Start Boat' }); sb.setId('startline.boat'); diff --git a/src/assets/img/startboat.png b/src/assets/img/startboat.png new file mode 100644 index 0000000000000000000000000000000000000000..7f45c193dfe4eb5021d133e7688483e2624a55a3 GIT binary patch literal 6235 zcmV-h7^LTkP)d7M+#*~hPR z>RYVVs?~I=R;?{))yiAN)>dnAL9N@{>MKYUL{Je>L1mFm!s>tn!^~t(|9Fz&=H_lm z?oDoz`~7_KnN04P+%uWqoO7P%JkN6=ARr*1)Tk(Q2a1Fqz$jolu&cm*2`FLC1~vl< z_yQPP*zN?BB6|T(A|lg1{!_?K1(Y7&24bWOO##h7RpGi8P%7*J{0(D~X&;9ds)GT= zO&4HK;3QxT_Ciy@Wd-SJKvAOU0rJcwKib4s_3dw~L!jh3-I}sRpJb9@Q4@wy9Y3J1Q34nD~C4 z?s_N0$s3RXz%z(Jkjc*^(T{8Z z^*QyZ3@L|^?QF#BZzZ(t2Cp5Fe4=8}<-jK0^`94J;?T@k3ml7z zJmUCW>kPL`wNvSQ(*1FP*c?)9V(Se21(<~OR@)q)4i%Z3(YueRhAtuft6C#r8?aP& z{cwu!b1VqO^dapB%mmK2X*U%(4i#CK@g1r{Fw)jY&`+g3fdewWR~b?)VjF`@VMkiD zX$5|Qid=+>G-rLM^mUuwNC=#}SyBvQyAYTG>}%0x6L2Cba&OLetE<_md!;9-PU65K z%@RM0tqQmonHJNA8x0GP_1O$p?pj~7!{AlzRQf*9qPrf9Y!2|N*!Bkg4P0r{ZW=Ha z6HWFDE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