List of usage examples for com.google.gwt.maps.client MapTypeId TERRAIN
MapTypeId TERRAIN
To view the source code for com.google.gwt.maps.client MapTypeId TERRAIN.
Click Source Link
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);// www. j a v a 2 s . 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.ElevationMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(39.31, -106.02); MapOptions opts = MapOptions.newInstance(); opts.setZoom(8);// ww w . j a v a 2 s . c om 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.HeatMapLayerWidget.java
License:Apache License
private void drawMap() { // zoom out for the clouds LatLng center = LatLng.newInstance(40.74, -73.94); MapOptions opts = MapOptions.newInstance(); opts.setZoom(11);//from w ww. jav a 2 s.com opts.setCenter(center); opts.setMapTypeId(MapTypeId.TERRAIN); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); // show transit layer TransitLayer transitLayer = TransitLayer.newInstance(); transitLayer.setMap(mapWidget); // create layer HeatMapLayerOptions options = HeatMapLayerOptions.newInstance(); options.setOpacity(0.9); options.setRadius(5); options.setGradient(getSampleGradient()); options.setMaxIntensity(3); options.setMap(mapWidget); HeatMapLayer heatMapLayer = HeatMapLayer.newInstance(options); // set data JsArray<LatLng> dataPoints = getSampleData(); heatMapLayer.setData(dataPoints); // the other way to set data // note JS array can be set from this method, but only MVCArray from the // options setData() method // MVCArray<WeightedLocation> weightedDataPoints = // MVCArray.newInstance(getSampleWeightedData()); // heatMapLayer.setDataWeighted(weightedDataPoints); GWT.log("Plotting " + dataPoints.length() + " points on HeatMap"); }
From source file:com.google.gwt.maps.testing.client.maps.MultipleKmlMapWidget.java
License:Apache License
private void drawMap() { LatLng center = LatLng.newInstance(46.649436, 2.633423); MapOptions opts = MapOptions.newInstance(); opts.setZoom(6);/*from w w w . ja v a 2 s .com*/ opts.setCenter(center); opts.setMapTypeId(MapTypeId.TERRAIN); opts.setStreetViewControl(false); opts.setPanControl(false); opts.setZoomControl(false); mapWidget = new MapWidget(opts); pWidget.add(mapWidget); mapWidget.setSize("750px", "500px"); }
From source file:org.rebioma.client.MapView.java
License:Apache License
private void initMap() { MapOptions mapOptions = MapOptions.newInstance(); mapOptions.setCenter(HistoryState.DEFAULT_CENTER); mapOptions.setZoom(DEFAULT_ZOOM);//from w w w .j a v a2 s. c o m mapOptions.setDraggableCursor("crosshair"); mapOptions.setDraggingCursor("move"); mapOptions.setMapTypeId(DEFAULT_MAP_TYPE); mapOptions.setScaleControl(true); MapTypeControlOptions mapTypeControlOptions = MapTypeControlOptions.newInstance(); mapTypeControlOptions.setMapTypeIds(MapTypeId.values()); mapTypesMap.put(MapTypeId.TERRAIN.toString(), MapTypeId.TERRAIN); mapTypesMap.put(MapTypeId.ROADMAP.toString(), MapTypeId.ROADMAP); mapTypesMap.put(MapTypeId.SATELLITE.toString(), MapTypeId.SATELLITE); mapOptions.setMapTypeControlOptions(mapTypeControlOptions); mapOptions.setMapTypeControl(true); map = new MapWidget(mapOptions); map.setWidth("100%"); map.setHeight("100%"); final MapView mapView = this; // map.addControl(getModelControl()); Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { HideControl hideControl = new HideControl(); map.setControls(ControlPosition.TOP_RIGHT, hideControl); controlsGroup.setMap(map, ControlPosition.RIGHT_TOP); // map.setControls(ControlPosition.TOP_RIGHT, geocoder); /*ScaleControl scaleControl = new ScaleControl(); LargeMapControl largeMapControl = new LargeMapControl(); MenuMapTypeControl mapTypeControl = new MenuMapTypeControl(); map.addControl(scaleControl); map.addControl(largeMapControl); map.addControl(mapTypeControl); ControlPosition hideControlPosition = new ControlPosition( ControlAnchor.TOP_RIGHT, 100, 10);*/ // envLayerSelector.setMap(map, ControlPosition.TOP_RIGHT); hideControl.addControlWidgetToHide(geocoder); hideControl.addControlWidgetToHide(envLayerSelector); CoordinatesControl coordinatesControl = new CoordinatesControl(map); MapDrawingControl mapDrawingControl = new MapDrawingControl(map, ControlPosition.TOP_CENTER); mapDrawingControl.addListener(mapView); ClearMapDrawingControl clearMapDrawingControl = new ClearMapDrawingControl(mapDrawingControl); map.setControls(ControlPosition.TOP_LEFT, clearMapDrawingControl); } }); map.addClickHandler(mapClickHandler); map.addZoomChangeHandler(mapZoomHandler); map.addMapTypeIdChangeHandler(mapTypeHandler); // map.checkResizeAndCenter(); }