PB-1691 : Remove pin and highlight position offset in 3D view#1352
PB-1691 : Remove pin and highlight position offset in 3D view#1352sami-nouidri-swisstopo merged 1 commit intodevelopfrom
Conversation
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
task-PB-1691-pin-position-3d
|
| Run status |
|
| Run duration | 05m 18s |
| Commit |
|
| Committer | Sami Nouidri |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
20
|
|
|
0
|
|
|
252
|
| View all changes introduced in this branch ↗︎ | |
723e951 to
7322b18
Compare
86edecf to
47117f1
Compare
|
When adding some other drawing features like label or line string there seems to be an error because none of it is displayed anymore https://sys-s.dev.bgdi.ch/11etrt82j3hu |
| } | ||
| } | ||
| if (entity.billboard) { | ||
| const imageUrl = entity.billboard.image._value._url |
There was a problem hiding this comment.
That call to entity.billboard.image should return a string (see here )
I don't think it's a good idea to use some private attributes of the object/entity (prefixed with _), you should find a way to access this information through some standard mean
07adc1f to
cd2cf29
Compare
I've addressed this and fixed how image URL is fetched, and now it seems to all work : |
| } | ||
| } | ||
|
|
||
| const isDefaultMarker = imageUrl ? imageUrl.includes('marker') : false |
There was a problem hiding this comment.
this might not be very safe, is there another way of verifying this if its the default marker? imageUrl === 'marker'?
There was a problem hiding this comment.
I've changed my check to be specific to 001-marker with imageUrl.includes('001-marker')
cd2cf29 to
cbc9066
Compare
| } | ||
| } | ||
|
|
||
| const isDefaultMarker = imageUrl ? imageUrl.includes('001-marker') : false |
There was a problem hiding this comment.
you can imageUrl?.includes('001-marker') instead of using a ternary. A undefined or null value will be "false" in JS (magic 🙈 )
1d33d18 to
6a0841b
Compare
The Marker icon has an offset in 2d space, in order to display it anchored on the tip, which cause the offset visible in 3d. Our solution is to add a conditional check in 3d to properly display markers, as all other icons don't have this problem.
6a0841b to
d56c8fd
Compare


Test link
The Marker icon has an offset in 2d space, in order to display it anchored on the tip, which
cause the offset visible in 3d. Our solution is to add a conditional check in 3d
to properly display markers, as all other icons don't have this problem.
Here's the result :
Test link