Select to view content in your preferred language

Dynamically Change the angle of the PictureMarkerSymbol

514
0
02-25-2022 04:40 AM
by Anonymous User
Not applicable

Hi;

I have two questions about this topic.

First Question;

I added PictureMarkerSymbol on my project using this;

 

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

 

but I cannot dynamically change the yaw angle value of the PictureMarkerSymbol. 

I get the yaw angle value from the panoramic image with the mousedown method. I can use this yaw angle value to create a new PictureMarkerSymbol. But I wanna do something like this;

https://krpano.com/examples/116/examples/virtual-tours/scenes-with-imagemap-2/scenes-with-imagemap-2...

How can I do that...

Second Question;

TarikBayram_1-1645792546376.png

When I add a new marker there are multiple markers as in the picture, I want the previous marker to be deleted but the clear() method is not working.

 

if(pointGraphic){
          pointGraphic.clear();
        }

 

 

How can I do this?

Thank you for your reply...

 

0 Kudos
0 Replies