001 package com.google.gwt.maps.client.layers; 002 003 import com.google.gwt.core.client.JavaScriptObject; 004 import com.google.gwt.maps.client.MapImpl; 005 import com.google.gwt.maps.client.MapWidget; 006 import com.google.gwt.maps.client.mvc.MVCObject; 007 008 /** 009 * A layer showing bike lanes and paths. This class extends MVCObject. <br> 010 * <br> 011 * See <a href= 012 * "https://developers.google.com/maps/documentation/javascript/reference#BicyclingLayer" 013 * >BicyclingLayer API Doc</a> 014 */ 015 public class BicyclingLayer extends MVCObject<BicyclingLayer> { 016 017 /** 018 * use newInstance(); 019 */ 020 protected BicyclingLayer() { 021 } 022 023 /** 024 * A layer that displays bike lanes and paths and demotes large roads. 025 */ 026 public static final BicyclingLayer newInstance() { 027 return createJso().cast(); 028 } 029 030 private static final native JavaScriptObject createJso() /*-{ 031 return new $wnd.google.maps.BicyclingLayer(); 032 }-*/; 033 034 public final void setMap(MapWidget mapWidget) { 035 if (mapWidget == null) { 036 setMapImpl(null); 037 } else { 038 setMapImpl(mapWidget.getJso()); 039 } 040 } 041 042 private final native void setMapImpl(MapImpl map) /*-{ 043 this.setMap(map); 044 }-*/; 045 046 public final MapWidget getMap() { 047 return MapWidget.newInstance(getMapImpl()); 048 } 049 050 private final native MapImpl getMapImpl() /*-{ 051 return this.getMap(); 052 }-*/; 053 054 }