Page 1 of 1

Problems with browser controls

Posted: Tue Aug 09, 2016 1:20 pm
by Bernd Welter
Hello together,

recently a partner encountered some issues with using PTV Ajax maps within browser controls.
German error message that was raised in a sample application which tries to access the Ajax maps via a browser control.
German error message that was raised in a sample application which tries to access the Ajax maps via a browser control.
browser control.PNG (8.95 KiB) Viewed 4733 times
I think the error message is suboptimal (an error occurred, line 0, char 0). Most problems we had in combination with browser controls are driven by the “user-agent”. Though it is not state-of-the-art we have some built-in checks.
We assume that the included Internet Explorer does not authenticate himself properly as Internet Explorer and this causes an error whenever functions are called that are not known by the IE.
In such a case please add the following script code to your test application to identify the user-agent:

Code: Select all

alert(navigator.userAgent);
With this info we could check whether the control returns something strange. Besides this we do not have any specific requirements related to browser controls.

Feedback or solutions are appreciated ;-)

Best regards Bernd

Re: Problems with browser controls

Posted: Tue Aug 09, 2016 3:27 pm
by AndreasJunghans
Another common issue is an initial size of 0 for the control. This can lead to errors in the map scripts, so you should specify a minimum size in your HTML:

Code: Select all

<div id="mapContainer" style="...;min-width:100px;min-height:100px"></div>