Click for arcgis js the point of featureLayer

Click for arcgis js the point of featureLayer

Code:

the this .view.on ( 'the Click', (evt) => { 
        the let Layer = the this .map.findLayerById ( 'examLayer' )
         // create a query object is 
        the let Query = layer.createQuery ()
         // will click into points query object 
        query.geometry = { 
          type: 'Point', // autocasts AS new new Point () 
          longitude: evt.mapPoint.longitude, 
          Latitude: evt.mapPoint.latitude 
        } 
        // set the buffer 
        query.distance. 6 = // query set (intersection) 
        query.spatialRelationship = 'the intersects' 
        the let A
        Layer.queryFeatures = (Query) .then ((RES) => {
           // get the object features 
          the console.log (res.features) 
        }) 
      })        

Principle: Get points by queryFeatures method of featureLayer

Note, query the need to set up buffer zone

 

 

 

Research is not easy, please indicate the source .....

 

Guess you like

Origin www.cnblogs.com/s313139232/p/11580472.html