Differences

This shows you the differences between two versions of the page.

Link to this comparison view

isi:laboratoare:03 [2025/10/17 15:10]
sorin.ciolofan [Task]
isi:laboratoare:03 [2025/10/17 15:22] (current)
sorin.ciolofan [Task]
Line 46: Line 46:
 Indicatie: Trebuie diferentiat ce tip de click se intampla: feature/​graphic si atunci se deschide popup-ul sau punct obisnuit de pe harta si atunci se continua cu rutarea. Puteti folosi functia [[https://​developers.arcgis.com/​javascript/​latest/​api-reference/​esri-views-MapView.html#​hitTest|hitTest]] in acest scop. Indicatie: Trebuie diferentiat ce tip de click se intampla: feature/​graphic si atunci se deschide popup-ul sau punct obisnuit de pe harta si atunci se continua cu rutarea. Puteti folosi functia [[https://​developers.arcgis.com/​javascript/​latest/​api-reference/​esri-views-MapView.html#​hitTest|hitTest]] in acest scop.
 </​note>​ </​note>​
 +
 +<​code>​
 +   ​viewElement.addEventListener("​arcgisViewClick",​ async (event) => {
 +        const view = viewElement.view;​
 +        const hit = await view.hitTest(event.detail);​
 +  if (hit.results.length > 0  && hit.results[0].graphic.attributes?​.PlaceName) {
 +            // deschide popup
 +            .....
 +             ​return; ​ // opreste rutarea
 +                                                                               }
 +         //​continua cu rutarea
 +         ​......
 +                                                                      });
 +</​code>​
  
 **Task 3** **Task 3**
Line 109: Line 123:
  
  
-==== Resurse ====+/*==== Resurse ====*/
  
  
isi/laboratoare/03.1760703007.txt.gz · Last modified: 2025/10/17 15:10 by sorin.ciolofan
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0