Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

114
Vistas
webbrowser has stopped displaying web page

i need your help.

I use webbrowser in my delphi applications for displaying map. For unknown reason it has stopped working in all my apps from yestarday. All my application were working without issues for years.

Example code in delphi:

   WebBrowser1.silent := true;
   WebBrowser1.Navigate('c:\temp\test.html');

Example content of test.html:

<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<html>
<head>
    <script src="https://api.mapy.cz/loader.js"></script>
    <script>Loader.load()</script>
</head>

<body style="margin: 0px;">
    <div id="mapa" style="width:1900px; height:1160px;"></div>
    <script type="text/javascript">
        var stred = SMap.Coords.fromJTSK(1077766.44,675681.75);
        var mapa = new SMap(JAK.gel("mapa"), stred, 19);
        mapa.addDefaultLayer(SMap.DEF_BASE).enable();
    </script>
</body>
</html>

I have tried start my delphi apps on different computers with same result - it does not work on any computer, test web page is not displayed.

I have tried create new test application in Delphi 10.4 CE and in Turbo Delphi 2006 too, in both cases same result - test.html is not displayed in webbroser at all. I can open another web pages in webbrowser for example google.cz.

So it seems to me issue may be with test.html content, but same html file is possible to open in browsers like MS Edge, Opera etc. from same computer without any issues...

Now i'm little lost, because I'm not big expert I would appreciate advise how I can solve this issue.

Thanks

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The reason why the mentioned map is no longer showing in TWebBrowser is the fact that TWebBrowser is just a wrapper for Internet Explorer. And since with the last update to the map software support for Internet Explorer 11 (latest version of IE available) has been dropped it means that TWebBrowser is no longer capable of showing the said map properly.

You can read more in Map API change-log here

So I'm afraid you will have to replace the TWebBrowser component in your applications either with TEdgeBrowser which is available from Delphi 10.4 or newer or make use of CEF4Delphi which is an open sourced Delphi component for chromium based browser.

You can read more about TEdgeBrowser and how to set it up in Delphi documentation

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos