I am working on a Google map web application under Xojo. The map has a draggable marker that updates the values of latitude and longitude textboxes. Since the UI for mapping is entirely made with HTML/Javascript and shown through Xojo's WebHTMLViewer control, I am having problems getting the values of the lat-lang textboxes to Xojo.
How To Update Xojo Objects From HTML/Javascript?
556 Views Asked by John At
2
There are 2 best solutions below
1
On
You might try using the WebMapViewer control instead, which has Latitude and Longitude properties. Or if that doesn't meet your needs you could try creating your specific control using the Web SDK, located in the Extra/WebSDK folder of the Xojo installation.
Check out HTMLViewer's ExecuteJavaScript and ExecuteJavaScriptSync functions to interact with the HTML Viewer JavaScript. Use the JavaScript function detailed on the HTMLViewer.JavaScriptRequest Event to pass data back to the Xojo framework.
Since you're able to get the latitude and longitude values into those text fields, you should be able to pass them to the Xojo framework using these functions and event.