use of com.google.android.gms.maps.model.MarkerOptions 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.MarkerOptions in project actor-platform by actorapp.
the class MapPickerActivity method onMapLongClick.
@Override
public void onMapLongClick(LatLng latLng) {
select.setEnabled(true);
findViewById(R.id.select_text).setEnabled(true);
// geoData = latLng;
if (currentPick == null) {
MarkerOptions currentPickOptions = new MarkerOptions().draggable(true).position(geoData);
//currentPick = mMap.addMarker(currentPickOptions);
} else {
//currentPick.setPosition(geoData);
}
}
use of com.google.android.gms.maps.model.MarkerOptions in project Pokemap by omkarmoghe.
the class MapWrapperFragment method drawMarker.
private void drawMarker(LatLng position) {
if (mGoogleMap != null) {
Marker userSelectedPositionMarker = mGoogleMap.addMarker(new MarkerOptions().position(position).title(getString(R.string.position_picked)).icon(BitmapDescriptorFactory.fromBitmap(BitmapFactory.decodeResource(getContext().getResources(), R.drawable.ic_my_location_white_24dp))).zIndex(MapHelper.LAYER_MY_SEARCH).anchor(0.5f, 0.5f));
userSelectedPositionMarkers.add(userSelectedPositionMarker);
} else {
showMapNotInitializedError();
}
}
use of com.google.android.gms.maps.model.MarkerOptions in project DraggablePanel by pedrovgs.
the class PlacesSampleActivity method showPlace.
/**
* Show a place in PlaceFragment and SupportMapFragment and apply the maximize effect over the
* DraggablePanel.
*/
private void showPlace(int position) {
draggablePanel.setVisibility(View.VISIBLE);
draggablePanel.maximize();
PlaceViewModel placeViewModel = placesAdapter.getItem(position);
placeFragment.showPlace(placeViewModel);
mapFragment.getMap().clear();
LatLng latitudeLongitude = new LatLng(placeViewModel.getLatitude(), placeViewModel.getLongitude());
MarkerOptions marker = new MarkerOptions().position(latitudeLongitude);
marker.title(placeViewModel.getName());
marker.snippet(placeViewModel.getLatitude() + " , " + placeViewModel.getLongitude());
mapFragment.getMap().addMarker(marker);
mapFragment.getMap().moveCamera(CameraUpdateFactory.newLatLngZoom(latitudeLongitude, ZOOM));
}
use of com.google.android.gms.maps.model.MarkerOptions in project google-io-2014 by romainguy.
the class DetailActivity method setupMap.
private void setupMap() {
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
double lat = getIntent().getDoubleExtra("lat", 37.6329946);
double lng = getIntent().getDoubleExtra("lng", -122.4938344);
float zoom = getIntent().getFloatExtra("zoom", 15.0f);
LatLng position = new LatLng(lat, lng);
map.moveCamera(CameraUpdateFactory.newLatLngZoom(position, zoom));
map.addMarker(new MarkerOptions().position(position));
}
Aggregations