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.

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

1

Wednesday, January 18th 2012, 9:14pm

markings in gigapixel panos?

Hi there,

what would be the best possibility to do markings like on this picture within gigapixel panos shown in krpano?!
http://www.panorama-verlag.com/Upload/Artikel/206.jpg

Thank you, bye
Andreas
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

This post has been edited 2 times, last edit by "Hellkeeper" (Jul 18th 2013, 1:48pm) with the following reason: broken link


2

Wednesday, January 18th 2012, 10:31pm

Place polygonal hotspots (lines) and text labels.

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

3

Thursday, July 18th 2013, 2:21pm

hi,

digging out this old thread as I now want to implement this feature into http://www.gpix.at
I managed to do the "poly-lines" ... but how can I "glue" a textlabel on tob of the hotspot lines? (as in the sample image I linked in my first Posting)

And is it possiblr to "shorten" the poly-lines when someone zooms to this region? so he will see the text label?

Andreas
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

4

Thursday, July 18th 2013, 2:52pm

tried it that way ... but as soon as i apply the *parent* property to the textfield - it won't show anymore!?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<hotspot name="mountain1"
     	visible="true"
     	enabled="true"
     	alpha="0.7"
     	borderwidth="1.0" borderwidthhover="1.0"
     	bordercolor="0x000000" bordercolorhover="0x000000"
     	borderalpha="0.7" borderalphahover="0.7"
     	maskchildren="false"
     	scalechildren="false"
>
<?php 
	$hsATH="0.12012576788128856";
	$hsATV="-0.0652396792101754";
	$hsHEIGHT="-0.02";
?>
	<point ath="<?php echo $hsATH; ?>" atv="<?php echo $hsATV; ?>" />
	<point ath="<?php echo $hsATH; ?>" atv="<?php echo $hsATV+$hsHEIGHT; ?>" />
</hotspot>
<plugin name="mountaintext1"
    	url="%SWFPATH%/plugins/textfield.swf"
    	parent="hotspot[mountain1]" 
    	html="[p]hotspot text[/p]"
    	css="p{color:#FF0000; font-family:Arial; font-size:14;}"
    	autosize="center"
    	align="center"
    	enabled="true"
    	x="1"
    	y="2"
    	height="100"
    	width="100"
    	visible="true"
    	enabled="true"
    	maskchildren="false"
    	scalechildren="false"
    	/>
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

5

Thursday, July 18th 2013, 4:31pm

playing around ... no matter what i do - as soon as I apply a parent ... it's not visible anymore ... event if i try it with an IMAGE - and not an textfield plugin ...

http://www.gpix.at.ex.ortsinfo.at/Gpix.a…,type,gpix.html
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

6

Thursday, July 18th 2013, 5:06pm

ok - i correct myself - it seems it's visible ... but it's floating around somewhere out of the visible space? and I have no clue why?
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

7

Thursday, July 18th 2013, 6:43pm

Now I made it without any parent ... guess I can life with that ... but got a last Question ... possible to shorten the polygonal lines when I zoom in? So that the Names of the Mountains don't get cut off that fast when zooming in?

http://www.gpix.at.ex.ortsinfo.at/Gpix.a…,type,gpix.html
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

8

Thursday, July 18th 2013, 11:15pm

Can't see your example as it is crushing:
ERROR: Security Error - "http://gpix.at.in.ortsinfo.at/userdata/gpix/kitzSteinbergkogel/l1_01_04.jpg"
but I have played with the idea and came up with something like this: See my try

User can navigate left/right and choose where he want to go/what giga pano to see. Masking of the hotspot is not perfect in my example but it will be enough for tickeling your brain *whistling*

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

9

Friday, July 19th 2013, 9:58am

Hi Umalo,

thank you for taking the time and doing a demo! ;-)
My Example should work now - img urls were company internal URLs ... now they are external!

The Problem is that I have to create the lines/texts dynamically as we are speaking of dozens of large Gigapixels with houndrets of Mountains - if we have to do it all by GFX it would take forever to mark all the Mountain Tops! ;-)
Right now it's solved like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<hotspot name="mountain<?php echo $i; ?>"
		     	visible="true"
		     	enabled="true"
		     	alpha="0.7"
		     	borderwidth="1.0" borderwidthhover="1.0"
		     	bordercolor="0x000000" bordercolorhover="0x000000"
		     	borderalpha="0.7" borderalphahover="0.7"
		     	maskchildren="false"
		     	children="false"
		     	scalechildren="false"
		>
			<point ath="<?php echo $hsATH; ?>" atv="<?php echo $hsATV; ?>" />
			<point ath="<?php echo $hsATH; ?>" atv="<?php echo $hsATV-$hsHEIGHT; ?>" />
		</hotspot>
		<hotspot name="mountain<?php echo $i; ?>TXT"
				 type="image"
		     	edge="bottom"
		     	handcursor="false"
		     	alpha="0.7"
		     	ath="<?php echo $hsATH; ?>" 
		     	atv="<?php echo $hsATV-$hsHEIGHT; ?>"
		     	url="<?php echo $imgURL; ?>"
		     	rotate="-40"
		>
		</hotspot>


The Text-Image is dynamically created by PHP - as it seems krpano can't rotate Text Elements.
It's working very good right now - the only problem I got is that I want to "shorten" the lines if someone is zooming in - so that one can also read the Mountain Names if zoomed in to the Mountain Top.

Andreas
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

This post has been edited 2 times, last edit by "Hellkeeper" (Jul 19th 2013, 10:28am)


Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

10

Friday, July 19th 2013, 10:45am

Just generally speaking I would think of dynamic height of line that is in relation to current zoom and than placement of text on top of it.
That would also mean dynamic redefinition of all hotspots - possible performance topic - to be tested.

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

11

Monday, July 22nd 2013, 10:33am

How would I define such dynamic height lines? And idea?
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

12

Monday, July 22nd 2013, 11:39am

what I try to achive is a *fixed height* when zooming in ... atv/ath as *start point* and "pixels" as height ... so it always looks the same - no matter how far I zoom in ... but I guess that's not possible?!?
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

13

Monday, July 22nd 2013, 12:04pm

for the lines I was able to do it ... I changed from polygon hotspots to image hotspots ... now the last problem is how I get the Text Images glued to this line ...
When I try to work with "parent" the Text is completely disorted?

http://temp.in.futureweb.at/krpano_markings.jpg
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

14

Monday, July 22nd 2013, 1:16pm

alright - now I made it totaly different then first thought ... no more polygon hotspots, ...
now I create everything with images ... and it's working as expected! ;-)

Example:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<hotspot name="mountain0"
	type="image"
	url="%SWFPATH%/skin/1px.gif"
	ath="0.13307276788129" 
	atv="-0.063696792101754"
	height="80"
	width="1"
	edge="bottom"
></hotspot>
		
<hotspot name="mountain0TXT"
	 type="image"
	 edge="bottomleft"
	 group="mountainTXT"
	 handcursor="false"
	 alpha="0.7"
	 ath="0.13307276788129" 
	 atv="-0.063696792101754"
	 url="/userdata/main/dyntxt/Der-Berg-1878m-d2784e25364ee4ea4e68de27282562cc.png"
	 rotate="-40"
></hotspot>


The Text-Image is automatically created with calculated padding left/bottom - so that it appears on top of the line

Working sample: http://www.gpix.at.ex.ortsinfo.at/Gpix.a…type,gpix.html#

often the most simple approach is the best one! ;-)
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

15

Monday, July 22nd 2013, 2:42pm

one little last problem is still there ... have a look here: http://temp.in.futureweb.at/krpano_markings1.jpg

The Lines are not equally thick!? Some are 2 px, some are 4px ...
But all of them are defined as 1px width?!? (width="1")
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

This post has been edited 2 times, last edit by "Hellkeeper" (Jul 23rd 2013, 11:10am)


Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

16

Monday, July 22nd 2013, 10:29pm

wow looks almost perfect. I was driving today and thinking about formulas for relation of zoom and line height ;)
Now I see you did it already. Nice nice nice.

Related to different line width: I assume you are changing line height based on Zoom factor with some formula. Are you sure you are explicitly setting width again. Maybe, when you redefine height only than other attribute is taken as Proportional one. Did you explore xml in memory to see real width at start and after some zooming. If you are able to provide with with at least one line + text example that I can investigate offline than I can take a look. Now it is difficult for me to say.

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

17

Tuesday, July 23rd 2013, 11:10am

Hi Umalo,

first I also was thinking about different formulas / algorithms to solve this problem. But now it's implemented without any complicated maths.
Right now the Line is a black 1x1 Pixel Image with a fixed height. (ie: 60px height x 1px width) - and the Text is an Image too. Rendered with PHP.

I activated background for the Text so you can see it better: http://temp.in.futureweb.at/krpano_markings2.jpg

It's just some padding bottom/left so the Text is aligned with the Line.


So the Lines are just "dumb" Images with fixed height and width ... and I don't find any reason why krpano shows them in different widths?!? :-(
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

18

Wednesday, July 24th 2013, 7:30pm

Hi,
So the Lines are just "dumb" Images with fixed height and width ... and I don't find any reason why krpano shows them in different widths?!? :-(
The reason for this is 'sub-pixel' rendering - that happens when the destination screen coordinates doesn't exactly fit the real pixels coordinates.

With accuracy=0 it should be normally possible to avoid that, but there is currently a bug that doesn't avoid it's correct working (should be fixed in the next release).

Best regards,
Klaus

Hellkeeper

Intermediate

  • "Hellkeeper" started this thread

Posts: 158

Location: St. Johann in Tirol

  • Send private message

19

Monday, July 29th 2013, 2:34pm

The reason for this is 'sub-pixel' rendering - that happens when the destination screen coordinates doesn't exactly fit the real pixels coordinates.
With accuracy=0 it should be normally possible to avoid that, but there
is currently a bug that doesn't avoid it's correct working (should be
fixed in the next release).

ok - then it makes sense why it's rendered that "weird" ;-)
Is there any ETA when the next release will be available?

Thank you
Andreas Schnederle-Wagner
Andreas Schnederle-Wagner
Rundblick GmbH / Gigapixel aus Österreich
https://www.rundblick.at/
https://www.gpix.at

20

Tuesday, July 30th 2013, 11:56am

Hi,

very soon - maybe this or next week...

Btw - the problem can be also avoided by using unscaled images - that means instead of using a 1x1 image and scaling it up to 1x60, use a 1x60 image and it should work too without scaling artifacts.

Best regards,
Klaus