Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Avirtum

    (@avirtum)

    The marker is an HTML element and has the attr identifier “data-marker-id”. Below is an example of using it to play a sound after clicking on a marker.

    
    const plugin = this;
    const $ = jQuery;
    
    plugin.$container.on('click', '.ipnrm-marker', (e) => {
        const $marker = $(e.currentTarget);
        const markerId = $marker.attr('data-marker-id');
        const scene = plugin.viewer.sceneActive;
        
        if(scene) {
            const marker = scene.cfg.markers.find(x => x.id === markerId);
            if(marker) {
                // console.log(marker.data); // if you want to use data from the marker "data" section
                const audio = new Audio('https://assets.mixkit.co/active_storage/sfx/940/940-preview.mp3');
                audio.play();
            }
        }
    });
    

    Paste this code into the js section of a virtual tour and test

    Thread Starter dubh

    (@spmcnerd)

    Hello again Avirtum,
    Sorry I’m not understanding the attr identifier linking part. If a user is on a buried person’s page (there’s 400+ burials getting 360 images) example: https://crownhillcemetery.org/mcmaster-emma-alice-webb/ I’d like to create a hyperlink on that page that lands on the person’s 360 image within iPanorama 360. If possible. Thank You!
    The steps to get to the mentioned 360 image.

    Page the map is on.
    https://crownhillcemetery.org/360-virtual-map/

    Plugin Author Avirtum

    (@avirtum)

    Do you want the user to be taken to a specific scene in the tour after clicking on an external link? Am I right?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Link to a Marker’ is closed to new replies.