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
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
Place polygonal hotspots (lines) and text labels.
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
tried it that way ... but as soon as i apply the *parent* property to the textfield - it won't show anymore!?
<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"
/>
Display More
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.at-Gigapi…,type,gpix.html
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?
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.at-Gigapi…,type,gpix.html
Can't see your example as it is crushing:
ERROR: Security Error - "http://gpix.at.in.ortsinfo.at/userdata/gpix/…el/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
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:
<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>
Display More
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
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.
How would I define such dynamic height lines? And idea?
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?!?
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?
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:
<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>
Display More
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.at-Gigapixel_gpath,kitzSteinbergkogel,pid,9112,type,gpix.html#
often the most simple approach is the best one!
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")
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.
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?!?
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
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
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
Don’t have an account yet? Register yourself now and be a part of our community!