You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, May 11th 2014, 9:09pm

Hotspot location on Image Map

Hi,
I have my own map which is an image and I like to add hotspots to it that go to a scene and show some text info on the hotspot.
How can I determine the location of the hotspot how is that calculated? Is it based on pixels and size of image can someone please provide me the equation for calculating the x and y for the layer. For example



<layer name="spot2" url="img/test.png" keep="true" align="lefttop" edge="center" x="464" y="240" onclick="loadscene(scene_3am, null, MERGE, BLEND(1));tween(layer[map].width,64);tween(layer[map].height,45);" />


How to know the x and y for the hotspot?
I have a tool called GIMP that I use?
Thanks for your help.

Umalo

Professional

Posts: 1,048

Location: Osijek, Croatia, EU

  • Send private message

2

Monday, May 12th 2014, 10:04am

I do the following.
- Have already adapted draging plugin example to draw me x and y of the plugin being dragged:
http://krpano.com/examples/117/examples/…ble-layers.html

- Add one spot to you map to some x and y and than move it around the map as you like. Open your code in parallel and adapt the values based on positions you like. Moving with just one mapspot you can do all the work

- At the end reload you tour to see and check if all spots are on correct place.
- This takes less than 2 min to adapt e.g. 10 points on the map.

Using style you can make all your spots use the same and there you define if you want onhover text to be displayed or else.

Tuur

Sage

Posts: 3,206

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

3

Monday, May 12th 2014, 7:23pm

Hi,

I open the map graphic in photoshop. Put my mouse on a hotspot location and use the x and y of the mouse in the hotspot code.
Make sure scalechildren = true in the map layer when you let it resize or so.
Hope it helps!

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur