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.

Problems with browser controls

Postby Bernd Welter » Tue Aug 09, 2016 1:20 pm

Hello together,

recently a partner encountered some issues with using PTV Ajax maps within browser controls.

browser control.PNG
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 3166 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: javascript code

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
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1638
Joined: Mon Apr 14, 2014 10:28 am

Re: Problems with browser controls

Postby AndreasJunghans » Tue Aug 09, 2016 3:27 pm

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>
Posts: 11
Joined: Tue May 13, 2014 3:28 pm

Return to PTV Webclients (Ajax, Leaflet, OpenLayers, WMS, ...) (Admin=LNM)