Skip to content

Get Latitude and Longitude of Mouse Click

Rob Terpilowski edited this page Mar 2, 2017 · 2 revisions
        MapOptions mapOptions = new MapOptions();

        mapOptions.center(new LatLong(47.6097, -122.3331))
                .mapType(MapTypeIdEnum.ROADMAP)
                .zoom(9);
        GoogleMap map = googleMapView.createMap(mapOptions, false);

        map.addMouseEventHandler(UIEventType.click, (GMapMouseEvent event) -> {
            LatLong latLong = event.getLatLong();
        });

test

Clone this wiki locally