private void drawMap() { LatLng center = LatLng.newInstance(49.496675, -102.65625); MapOptions opts = MapOptions.newInstance(); opts.setZoom(4); opts.setCenter(center); opts.setMapTypeId(MapTypeId.HYBRID); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("100%", "100%"); mapWidget.addClickHandler( new ClickMapHandler() { public void onEvent(ClickMapEvent event) { // TODO fix the event getting, getting .... GWT.log("clicked on latlng=" + event.getMouseEvent().getLatLng()); } }); }
private void drawMap() { LatLng center = LatLng.newInstance(42.35, -71.07); MapOptions opts = MapOptions.newInstance(); opts.setZoom(14); opts.setCenter(center); opts.setMapTypeId(MapTypeId.ROADMAP); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); mapWidget.addClickHandler( new ClickMapHandler() { public void onEvent(ClickMapEvent event) { // TODO fix the event getting, getting .... GWT.log("clicked on latlng=" + event.getMouseEvent().getLatLng()); } }); }