M menneaduplo Member Licensed User Longtime User Feb 16, 2023 #1 If I try to load the simple attached map.html file into a B4J webview this doesn't work. With any browser, yes. The html file contains an OpenStreetMap map with scripts. Can anyone help me? Thanks in advance. My Code [CODE lang="b4x" title="My Code"]Sub Process_Globals Private fx As JFX Private MainForm As Form Private xui As XUI Private Button1 As B4XView Private WebView1 As WebView End Sub Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.RootPane.LoadLayout("main") Dim S As String S=File.ReadString(File.DirApp,"map.html") WebView1.LoadHtml(S) MainForm.Show End Sub[/CODE] Attachments map.zip map.zip 798 bytes · Views: 401
If I try to load the simple attached map.html file into a B4J webview this doesn't work. With any browser, yes. The html file contains an OpenStreetMap map with scripts. Can anyone help me? Thanks in advance. My Code [CODE lang="b4x" title="My Code"]Sub Process_Globals Private fx As JFX Private MainForm As Form Private xui As XUI Private Button1 As B4XView Private WebView1 As WebView End Sub Sub AppStart (Form1 As Form, Args() As String) MainForm = Form1 MainForm.RootPane.LoadLayout("main") Dim S As String S=File.ReadString(File.DirApp,"map.html") WebView1.LoadHtml(S) MainForm.Show End Sub[/CODE]
Erel B4X founder Staff member Licensed User Longtime User Feb 16, 2023 #2 Code: Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("MainPage") WebView1.LoadUrl(xui.FileUri("C:\Users\H\Downloads\map.html", "")) End Sub I've tested with OpenJDK 14 (download from forum) Upvote 0
Code: Private Sub B4XPage_Created (Root1 As B4XView) Root = Root1 Root.LoadLayout("MainPage") WebView1.LoadUrl(xui.FileUri("C:\Users\H\Downloads\map.html", "")) End Sub I've tested with OpenJDK 14 (download from forum)
M menneaduplo Member Licensed User Longtime User Feb 17, 2023 #3 Thanks Erel, your help is always invaluable. Congratulations for all the work done!! Upvote 0