List of usage examples for com.google.gwt.maps.client.events.click ClickMapHandler ClickMapHandler
ClickMapHandler
From source file:com.google.gwt.maps.testing.client.maps.AdvancedLayersWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(42.35, -71.07); MapOptions opts = MapOptions.newInstance(); opts.setZoom(14);//from ww w. ja v a 2s. c o m 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()); } }); }
From source file:com.google.gwt.maps.testing.client.maps.AutocompletePlacesMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(49.496675, -102.65625); MapOptions opts = MapOptions.newInstance(); opts.setZoom(8);/*ww w. j ava 2s. c om*/ opts.setCenter(center); opts.setMapTypeId(MapTypeId.TERRAIN); 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()); } }); }
From source file:com.google.gwt.maps.testing.client.maps.BasicMapWidget.java
License:Apache License
private void drawBasicMarker() { LatLng center = LatLng.newInstance(47.8, -121.4); MarkerOptions options = MarkerOptions.newInstance(); options.setPosition(center);//www .j a v a2 s . c o m options.setTitle("Hello World"); markerBasic = Marker.newInstance(options); markerBasic.setMap(mapWidget); markerBasic.addClickHandler(new ClickMapHandler() { @Override public void onEvent(ClickMapEvent event) { drawInfoWindow(markerBasic, event.getMouseEvent()); } }); }
From source file:com.google.gwt.maps.testing.client.maps.BasicMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(49.496675, -102.65625); MapOptions opts = MapOptions.newInstance(); opts.setZoom(4);//w ww . j av a 2 s. co m opts.setCenter(center); opts.setMapTypeId(MapTypeId.HYBRID); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); mapWidget.addClickHandler(new ClickMapHandler() { @Override public void onEvent(ClickMapEvent event) { // TODO fix the event getting, getting .... GWT.log("clicked on latlng=" + event.getMouseEvent().getLatLng()); } }); }
From source file:com.google.gwt.maps.testing.client.maps.ControlsMapWidget.java
License:Apache License
private void drawMap() { MapTypeControlOptions controlOptions = MapTypeControlOptions.newInstance(); controlOptions.setMapTypeIds(MapTypeId.values()); // use all of them controlOptions.setPosition(ControlPosition.RIGHT_CENTER); LatLng center = LatLng.newInstance(49.496675, -102.65625); MapOptions options = MapOptions.newInstance(); options.setZoom(4);//from w ww . j a v a 2 s.c om options.setCenter(center); options.setMapTypeId(MapTypeId.HYBRID); options.setMapTypeControlOptions(controlOptions); mapWidget = new MapWidget(options); 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()); } }); }
From source file:com.google.gwt.maps.testing.client.maps.CustomControlsMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(49.496675, -102.65625); MapOptions opts = MapOptions.newInstance(); opts.setZoom(4);/*from ww w . ja v a 2s .c o m*/ opts.setCenter(center); opts.setMapTypeId(MapTypeId.HYBRID); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); mapWidget.addClickHandler(new ClickMapHandler() { public void onEvent(ClickMapEvent event) { } }); }
From source file:com.google.gwt.maps.testing.client.maps.DirectionsServiceMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(48.11, -123.24); MapOptions opts = MapOptions.newInstance(); opts.setZoom(8);//w w w . jav a2 s .com opts.setCenter(center); opts.setMapTypeId(MapTypeId.HYBRID); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); mapWidget.addClickHandler(new ClickMapHandler() { public void onEvent(ClickMapEvent event) { } }); }
From source file:com.google.gwt.maps.testing.client.maps.DrawingMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(49.496675, -102.65625); MapOptions opts = MapOptions.newInstance(); opts.setZoom(4);//from w w w . j a v a 2s . com opts.setCenter(center); opts.setMapTypeId(MapTypeId.HYBRID); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); mapWidget.addClickHandler(new ClickMapHandler() { @Override public void onEvent(ClickMapEvent event) { GWT.log("clicked on latlng=" + event.getMouseEvent().getLatLng()); } }); }
From source file:com.google.gwt.maps.testing.client.maps.ElevationMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(39.31, -106.02); MapOptions opts = MapOptions.newInstance(); opts.setZoom(8);//from w w w . ja v a2 s . co m opts.setCenter(center); opts.setMapTypeId(MapTypeId.TERRAIN); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); mapWidget.addClickHandler(new ClickMapHandler() { @Override public void onEvent(ClickMapEvent event) { GWT.log("clicked on latlng=" + event.getMouseEvent().getLatLng()); LatLng point = event.getMouseEvent().getLatLng(); findElevation(point); } }); }
From source file:com.google.gwt.maps.testing.client.maps.FullPageMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(49.496675, -102.65625); MapOptions opts = MapOptions.newInstance(); opts.setZoom(4);/* ww w .ja v a 2 s .co m*/ 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()); } }); }