question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to add second set marker to image?

See original GitHub issue

How 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:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
mistic100commented, Mar 23, 2020

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.

0reactions
Wintear91commented, Mar 24, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found