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.
Asked
Active
Viewed 487 times
1
-
Welcome to Stack Overflow! Questions seeking code help must include the shortest code necessary to reproduce it in the question itself preferably in a Stack Snippet. See [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/mcve) – jasie Jun 23 '21 at 07:39
2 Answers
0
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.

timi
- 50
- 5
-
Hello Timi, Thanks for the reply but I'm working on WebHTMLViewer. You maybe referring to the desktop HTMLViewer. – John Jun 29 '21 at 14:32
0
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.

Paul Lefebvre
- 6,253
- 3
- 28
- 36
-
Hello Paul, Thank you for your answer but Xojo's WebMapViewer is kinda limited. It doesn't have the feature to drag the pin that automatically updates the latitude and longitide. – John Jul 23 '21 at 01:29