Java Code Examples for com.google.android.gms.maps.model.Marker#setRotation()

The following examples show how to use com.google.android.gms.maps.model.Marker#setRotation() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MapViewHandler.java    From PowerSwitch_Android with GNU General Public License v3.0 5 votes vote down vote up
public void updateMarker(String id, MarkerOptions markerOptions) {
    Marker marker = markers.get(id);
    marker.setPosition(markerOptions.getPosition());
    marker.setAlpha(markerOptions.getAlpha());
    marker.setDraggable(markerOptions.isDraggable());
    marker.setFlat(markerOptions.isFlat());
    marker.setIcon(markerOptions.getIcon());
    marker.setVisible(markerOptions.isVisible());
    marker.setTitle(markerOptions.getTitle());
    marker.setSnippet(markerOptions.getSnippet());
    marker.setRotation(markerOptions.getRotation());
    marker.setAnchor(markerOptions.getAnchorU(), markerOptions.getAnchorV());
    marker.setInfoWindowAnchor(markerOptions.getInfoWindowAnchorU(), markerOptions.getInfoWindowAnchorV());
}
 
Example 2
Source File: MarkerDemoActivity.java    From android-samples with Apache License 2.0 5 votes vote down vote up
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    if (!checkReady()) {
        return;
    }
    float rotation = seekBar.getProgress();
    for (Marker marker : mMarkerRainbow) {
        marker.setRotation(rotation);
    }
}