use of com.google.android.gms.maps.model.Marker in project cw-omnibus by commonsguy.
the class MainActivity method animateMarker.
private void animateMarker() {
map.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 48));
Property<Marker, LatLng> property = Property.of(Marker.class, LatLng.class, "position");
ObjectAnimator animator = ObjectAnimator.ofObject(markerToAnimate, property, new LatLngEvaluator(), nextAnimationEnd);
animator.setDuration(2000);
animator.start();
if (nextAnimationEnd == LINCOLN_CENTER) {
nextAnimationEnd = PENN_STATION;
} else {
nextAnimationEnd = LINCOLN_CENTER;
}
}
use of com.google.android.gms.maps.model.Marker in project cw-omnibus by commonsguy.
the class MainActivity method addMarker.
private void addMarker(GoogleMap map, double lat, double lon, int title, int snippet) {
Marker marker = map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)).title(getString(title)).snippet(getString(snippet)));
builder.include(marker.getPosition());
}
use of com.google.android.gms.maps.model.Marker in project AirMapView by airbnb.
the class NativeGoogleMapFragment method removeMarker.
@Override
public void removeMarker(AirMapMarker<?> marker) {
Marker nativeMarker = marker.getMarker();
if (nativeMarker != null) {
nativeMarker.remove();
markers.remove(nativeMarker);
}
}
use of com.google.android.gms.maps.model.Marker in project Pokemap by omkarmoghe.
the class MapWrapperFragment method clearPokemonCircles.
private void clearPokemonCircles() {
//Check and eventually remove old marker
if (userSelectedPositionMarkers != null && userSelectedPositionCircles != null) {
for (Marker marker : userSelectedPositionMarkers) {
marker.remove();
}
userSelectedPositionMarkers.clear();
for (Circle circle : userSelectedPositionCircles) {
circle.remove();
}
userSelectedPositionCircles.clear();
}
}
use of com.google.android.gms.maps.model.Marker in project Pokemap by omkarmoghe.
the class MapWrapperFragment method onEvent.
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEvent(MarkerUpdate event) {
if (mSelectedMarker != null) {
Marker marker = mSelectedMarker.getMarker();
if (marker.isInfoWindowShown()) {
long time = mSelectedMarker.getCatchablePokemon().getExpirationTimestampMs() - System.currentTimeMillis();
marker.setSnippet(getExpirationBreakdown(time));
marker.showInfoWindow();
}
}
}
Aggregations