Problems with browser controls

This forum deals with any kind of web based client technology, whether it is the well known java script based Ajax servlet or the upcoming approaches such as Leaflet, OpenLayers and so on.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Problems with browser controls

Post 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 4652 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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
AndreasJunghans
Posts: 13
Joined: Tue May 13, 2014 3:28 pm

Re: Problems with browser controls

Post 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>
Post Reply