-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Description
I want to open a InfoWindow when clicking on a polyline:
` map.addUIEventHandler(polygon, UIEventType.click, (JSObject obj) -> {
System.out.println("Polygon click");
InfoWindowOptions infoWindowOptions = new InfoWindowOptions();
infoWindowOptions.position(new LatLong( 31.33255233509554 , 121.6711721454525 ));
infoWindowOptions.content("<h2>Fred Wilkie</h2>"
+ "Current Location: Safeway<br>"
+ "ETA: 45 minutes" );
InfoWindow fredWilkeInfoWindow = new InfoWindow(infoWindowOptions);
fredWilkeInfoWindow.open(map);
});
`
But how can I set the position to the position the mouse was clicked? In my case I have a shipping route and as soon as someone clicks on the route I want a popup at that position on the map.
Thanks for your help
Metadata
Metadata
Assignees
Labels
No labels