add specific highlight

249
2
Jump to solution
02-22-2022 11:55 PM
TarikBayram
New Contributor II

Hi,

I want to add a special highlight like the default highlight that occurs when I click on a point in the feature layer. How can I do that? 

0 Kudos
1 Solution

Accepted Solutions
TarikBayram
New Contributor II

Thank you @BlakeTerhune  for the reply i solved the problem with the GraphicAPI document. If anyone encounters the same problem later, I leave the solution below.

 

 

 const point = {
            type: "point",
            longitude: X,
            latitude: Y
          };
          const markerSymbol = {
            type: "picture-marker",

            url : "your_url",
            width: "30px",
            height: "50px",
            angle: yaw, 
          };
          const pointGraphic = new Graphic({
            geometry: point,
            symbol: markerSymbol,
          }); 
          view.graphics.add(pointGraphic); 
        }

 

 

 

 

 

 

View solution in original post

2 Replies
BlakeTerhune
MVP Regular Contributor

Have you read the API documentation for the FeatureLayerView highlight method? There's a sample app there too. If this isn't sufficient, you'll need to be more specific about what you want to do.

TarikBayram
New Contributor II

Thank you @BlakeTerhune  for the reply i solved the problem with the GraphicAPI document. If anyone encounters the same problem later, I leave the solution below.

 

 

 const point = {
            type: "point",
            longitude: X,
            latitude: Y
          };
          const markerSymbol = {
            type: "picture-marker",

            url : "your_url",
            width: "30px",
            height: "50px",
            angle: yaw, 
          };
          const pointGraphic = new Graphic({
            geometry: point,
            symbol: markerSymbol,
          }); 
          view.graphics.add(pointGraphic); 
        }