Select to view content in your preferred language

add specific highlight

711
2
Jump to solution
02-22-2022 11:55 PM
by Anonymous User
Not applicable

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
by Anonymous User
Not applicable

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.

by Anonymous User
Not applicable

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); 
        }