Polygonal hotspot (layer) on a flat image map (layer)

  • Hi! My level of knowledge is to take a code snippet from the example and paste it into my tour. Basically everything works out, but I can't solve one problem or even find a way to look for it):

    In all the examples, I see coordinates (ath, atv) for points of hotspots or layers that work in the panorama space (yes, I can make a flat panorama and use it all). But would I like to use a polygonal hotspot on the image of a map or layer? Is this possible, how will the x/y coordinates for the polygon points be specified relative to the substrate layer (map)?

    Thanks!

  • Take a look at https://krpano.com/releases/1.23/…otour-apartment

    In the xml, polygon hotspots have been defined:

    Code
    		<hotspot name="er_to_lr" style="roomspot" tooltip="get:scene[lr].title" onclick="scene3dtransition(lr);">
    			<point ath="-31.167381" atv="-26.721998" />
    			<point ath="1.439101" atv="-30.402683" />
    			<point ath="1.877027" atv="43.226524" />
    			<point ath="-31.571499" atv="37.882914" />
    		</hotspot>

    ath/atv behave the same as ath/atv for normal hotspots...

  • This is because a flat panorama is just a really small picture inside the space of a spherical panorama.

    You can either just figure out and use ath/atv or calculate it from pixel x/y.

    I for example use thousands of perfectly pixel aligned hotspots on a flat panorama which get automatically calculated from the corresponding pixel coordinates.

  • Take a look at https://krpano.com/releases/1.23/…otour-apartment

    In the xml, polygon hotspots have been defined:

    Code
    		<hotspot name="er_to_lr" style="roomspot" tooltip="get:scene[lr].title" onclick="scene3dtransition(lr);">
    			<point ath="-31.167381" atv="-26.721998" />
    			<point ath="1.439101" atv="-30.402683" />
    			<point ath="1.877027" atv="43.226524" />
    			<point ath="-31.571499" atv="37.882914" />
    		</hotspot>

    ath/atv behave the same as ath/atv for normal hotspots...

    Thanks, I'm trying this option, but it doesn't build on top of the map. although the exact same hotspot in the panorama space works.  Maybe I need to try different values:

  • This is because a flat panorama is just a really small picture inside the space of a spherical panorama.

    You can either just figure out and use ath/atv or calculate it from pixel x/y.

    I for example use thousands of perfectly pixel aligned hotspots on a flat panorama which get automatically calculated from the corresponding pixel coordinates.

    Thanks!
    Yes, I understand how it should work and it works on the panorama, but I can't repeat it on the image layer. And I began to doubt whether it was possible in this way.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!