Hello everyone,
I wanted to create an application in javafx where the use can click on the google map and the application will save the x-y coordinates. I found this
article on java fx experience Maps in JavaFX 2.0 // JavaFX News, Demos and Insight // FX Experience and that worked very well. But this example
only communicates from javafx to javascript.
Now I added this method to their java script:
google.maps.event.addListener(document.map, "click", function(event) {
var lat = event.latLng.lat();
var lng = event.latLng.lng();
// populate yor box/field with lat, lng
alert("Lat=" + lat + "; Lng=" + lng);
});
and it works if I call the html page by itself. But if I click on the map inside my javafx application, no popup will be shown. That probably something with the webengine,
but I don't need the popup, I need the information lat and lng in my java fx application.
Does anyone has an idea of how to realize that?
Thanks,
Hauke