You are not logged in.

1

Wednesday, April 1st 2020, 12:23am

Custom tile urls - hotspot bug

When using custom-tile-urls, hotspots that are smaller than some critical size are no longer active.
Two similar hotspots are presented in the example. The difference is only in the value of the scale.
A spot with a larger size is pressed, while a smaller one is not pressed for some reason.
https://sferitus.com/?xml=osmmap/maps.xml

This hotspots does not work:

Source code

1
2
3
4
5
6
7
<hotspot name="dis" onhover="showtext(test,STYLE4);"
onclick="onclickB();"
onclickA="set(hotspot[dis].alpha,1); set (onclick, onclickB() );"
onclickB="set(hotspot[dis].alpha,0.5); set(onclick, onclickA() );"
	url="%HTMLPATH%/drone_map512.png" width="2048" height="2048"
	scale="0.0000001" zoom="true" capture="false"
	ath="0.0658058" atv="-0.1701285" />


This hotspots works:

Source code

1
2
3
4
5
6
7
<hotspot name="en" onhover="showtext(test,STYLE4);"
onclick="onclickB();"
onclickA="set(hotspot[en].alpha,1); set (onclick, onclickB() );"
onclickB="set(hotspot[en].alpha,0.5); set(onclick, onclickA() );"
	url="%HTMLPATH%/drone_map512.png" width="2048" height="2048"
	scale="0.00000025" zoom="true" capture="false"
	ath="0.0658500" atv="-0.1701285" />

2

Wednesday, April 1st 2020, 9:35am

in your example you use a 512px image,
first scale it up to 2048px,
and then scale it down again with 0.0000001 / 0.00000025

these are crazy! *blink* scale values

i avoid to use scale values under 0.5 or over 2.0 *smile*

something is odd with how you implement that map,
it should not be necessary to use such scaling

This post has been edited 1 times, last edit by "indexofrefraction" (Apr 1st 2020, 9:46am)


3

Wednesday, April 1st 2020, 10:39am

Hi,

thanks for reporting!

That's numerical bug in the internal hotspot-hittesting code, at very small scales a value in the calculation gets very near to zero and a check for zero there is a bit inaccurate...

That will be fixed soon in the next release (1.20.6).

As workaround for the moment you could try using renderer="css3d" for the hotspots. That a different hotspot rendering and hit-testing will be used.


Quoted

these are crazy! *blink* scale values
That's a very large 'pano' (134.217.728 x 134.217.728px ;-)), therefore these scales, and normally (when there are no unexpected bugs) they shouldn't causes problems and are fully valid.

Best regards,
Klaus