J jefflynn1974 Member Licensed User Longtime User Apr 27, 2020 #1 Hi there I want to display a map in a webwiev (or WkWebWiev) with the following html code. Html for Openstreetmap: <!DOCTYPE HTML> <title>OpenLayers Simplest Example</title> <div id='demoMap' style='height:250px'></div> <script src='https://www.openlayers.org/api/OpenLayers.js'></script> <script> map = new OpenLayers.Map('demoMap'); map.addLayer(new OpenLayers.Layer.OSM()); map.zoomToMaxExtent(); </script> All I get is a blank webview. No error messages neither in B4i log nor in system log on my Mac. I'm using this line: WebWiev with html string: WKWebView1.LoadHtml("<!DOCTYPE HTML> <title>OpenLayers Simplest Example</title> <div id='demoMap' style='height:250px'></div> <script src='https://www.openlayers.org/api/OpenLayers.js'></script>") So my questions are: how to get the error messages? and how to display a map in (Wk)WebWiev?
Hi there I want to display a map in a webwiev (or WkWebWiev) with the following html code. Html for Openstreetmap: <!DOCTYPE HTML> <title>OpenLayers Simplest Example</title> <div id='demoMap' style='height:250px'></div> <script src='https://www.openlayers.org/api/OpenLayers.js'></script> <script> map = new OpenLayers.Map('demoMap'); map.addLayer(new OpenLayers.Layer.OSM()); map.zoomToMaxExtent(); </script> All I get is a blank webview. No error messages neither in B4i log nor in system log on my Mac. I'm using this line: WebWiev with html string: WKWebView1.LoadHtml("<!DOCTYPE HTML> <title>OpenLayers Simplest Example</title> <div id='demoMap' style='height:250px'></div> <script src='https://www.openlayers.org/api/OpenLayers.js'></script>") So my questions are: how to get the error messages? and how to display a map in (Wk)WebWiev?
J jefflynn1974 Member Licensed User Longtime User Apr 27, 2020 #2 I'm answering my own questions, it might be useful for others. 1. The error messages can be seen in Safari development tab - Simulator - Device name ... 2. The reason was App Transport Security, for more info read this Upvote 0
I'm answering my own questions, it might be useful for others. 1. The error messages can be seen in Safari development tab - Simulator - Device name ... 2. The reason was App Transport Security, for more info read this