How to add second set marker to image?
See original GitHub issueHow do I add “second” set markers to the second image after calling PSV.setPanorama() function? I have customized a marker to do the switching to 2nd panorama.
I realise the function markers: (function () {…} i try do if/else return var a/ var b but does’nt seems to work.
Anyone have examples? am doing a switch back and fourth layout.
PSV.on('select-marker', function (marker, click) {
if (marker.data && marker.data.deletable) {
if (click) {
PSV.removeMarker(marker);
}
else {
PSV.updateMarker({
id: marker.id,
image: 'assets/pin2.png'
});
}
} else if (marker.data && marker.data.id === "go-ground-floor") {
if (click) {
i++;
console.log(i);
PSV.clearMarkers();
if(i > 1){
i = 0;
}
PSV.setPanorama(panos[i].url, panos[i].target, true);
}
}
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to Create Image Markers - YouTube
Learn how to display assets that need to be tracked in precise locations like those within factories, hospitals, schools, or other large ...
Read more >Adding markers to your image - Getting started with Micrio
1. Find the image in your dashboard. Click to open the editor. marker-adding-0 · 2. Open the marker editor. By clicking "MARKERS" at...
Read more >android how to add marker on image? - Stack Overflow
You should create bitmap from your image and then draw pixel and ... I would go with first suggestion, and in opposite case...
Read more >Markers | Maps JavaScript API - Google Developers
You can set a custom icon within the marker's constructor, or by calling setIcon() on the marker. See more about customizing the marker...
Read more >Insert markers in image or video - MATLAB insertMarker
This MATLAB function returns a truecolor image with inserted plus (+) markers.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
And there is the doc https://photo-sphere-viewer.js.org/api/module-components.PSVHUD.html#addMarker
By the way I absolutely hate spoon-feeding people, so I won’t write your code for you. But I answer question when you have working or non working code.
I got it work thanks.