Code example for GoogleMap

Methods: setTrafficEnabled

0
 
    private void updateTraffic() { 
        if (!checkReady()) { 
            return; 
        } 
        mMap.setTrafficEnabled(mTrafficCheckbox.isChecked());
    } 
 
    /** 
     * Called when the MyLocation checkbox is clicked. 
     */ 
    public void onMyLocationToggled(View view) {
        updateMyLocation(); 
    } 
 
    private void updateMyLocation() { 
        if (!checkReady()) { 
            return; 
        } 
        mMap.setMyLocationEnabled(mMyLocationCheckbox.isChecked());
    }