Select to view content in your preferred language

Line Of Sight Widget produced lines partially

68
1
yesterday
JuanMarvinW
New Contributor

Hello All, I need help on solving problem regarding Line Of Sight Widget's lines. I was using ArcGIS Javascript 4.33. And I was using the Line Of Sight widget on my code, like:

const lineOfSight = new LineOfSight({
            view: view,
            container: "losWidget",
          });
 
which originally I followed from this sample: https://developers.arcgis.com/javascript/latest/sample-code/widgets-line-of-sight/, and modified it by using my own WebScene layers.
 
However, the lines that comes from the LOS widget seems weird. They are not completely hidden, nor completely showed. This is what happen when I created the observer and the target from clicking the points on the map:
 
lineOfSight_javascriptwidget.png
 
However, I also tried to use the same WebScene (all the layers are the same), and created and used the LOS widget by using WebExperience. The result is different. LOS Widget from the Experience Builder created the lines properly after creating the observer point and target point on the map. These lines below were created from Experience Builder's LOS widget.
 
lineOfSight_experiencebuilder.png
 
Does anyone know why the results are different between LOS Widget from Javascript and LOS Widget from Experience Builder? Does anyone know any reference I can read/follow to produce the proper LOS lines using Javscript API like the one from Experience Builder's LOS Widget?
0 Kudos
1 Reply
GreteSoosalu
Esri Contributor

Hi @JuanMarvinW 

Thanks for reaching out! Could you maybe share the apps or the layer with me (either here or via direct message) so that we can look more into this? 

Is there a chance that all these buildings are one feature? Also, what I didn't 100% understand - did you create the lines of sight in the EB also by clicking in the scene/map? 

0 Kudos