Android GroundOverlayOptions - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android GroundOverlayOptions class.

This code example shows how to use the following methods:getBearing, getLocation
	void setMarker(Marker marker) {
		this.marker = marker;
	} 
 
	void updateOverlay() { 
		overlay.setPosition(groundOverlayOptions.getLocation());
		overlay.setBearing(groundOverlayOptions.getBearing());
	} 
 
	void updateMarker() { 
		marker.setPosition(groundOverlayOptions.getLocation());
	} 
 
	boolean isActive() { 
		return (overlay != null);
	} 
 
	String getPic() {
		return busTypes.get(type);
	} 
4
CodeRank
This code example shows how to use the following methods:
	//creates an overlay view of the field on the specified map object 
	public GroundOverlay createOverlay(GoogleMap map) {
		if(map == null){
			Log.e("createOverlay", "Null map");
		} 
		GroundOverlay groundOverlay = map.addGroundOverlay(new GroundOverlayOptions()
	     .image(BitmapDescriptorFactory.fromBitmap(rasterLayerBitmap))
	     .positionFromBounds(rasterBounds)
	     .transparency(0));
		groundOverlay.setVisible(true);
		return groundOverlay;
	} 
 
	//returns elevation of given point 
	public double pixelValueFromLatLng(LatLng point) {
		if (rasterBounds.contains(point)) {
			//use linear interpolation to figure out which pixel to get data from 
			//should be accurate since fields <= ~1 mile wide 
			double north = ne.longitude;
			double east = ne.latitude;
4
CodeRank
This code example shows how to use the following methods:
		BitmapDescriptor image = BitmapDescriptorFactory
				.fromResource(imageResource); // get an image.
		LatLngBounds bounds = new LatLngBounds(southWest, northEast); // get a
																		// bounds 
		// Adds a ground overlay with 10% transparency. 
		map.addGroundOverlay(new GroundOverlayOptions().image(image)
				.positionFromBounds(bounds).transparency(transparency));
	} 
	public void moveCameraToEvent(String eventId)
	{ 
		 
	} 
	public void moveCameraToMessage(String messageId)
	{ 
		 
	} 
	public void moveCameraToPerson(String PersonId)
	{ 
		Marker m=this.personMarkerdictionary.get(PersonId);
		if(m!=null)
4
CodeRank
This code example shows how to use the following methods:
		else 
			displayBmpToCircleInMap(circleBmp, latLng, radiusM, mapView);
	} 
	 
	private static void displayBmpToCircleInMap(BitmapDescriptor bmp, LatLng latLng, int radiusM, GoogleMap mapView) {
		GroundOverlayOptions options = new GroundOverlayOptions().
	            image(bmp).
	            position(latLng,radiusM*2,radiusM*2).
	            transparency(0.4f);
		final GroundOverlay circle = mapView.addGroundOverlay(options);
		fadeOutCircle(circle);
	} 
 
	private static void fadeOutCircle(final GroundOverlay circle) {
		ValueAnimator animation = ValueAnimator.ofFloat(0, 1);
		animation.setDuration(1000*2);
		animation.setInterpolator(new AccelerateInterpolator(2.0f));
		animation.addUpdateListener(new AnimatorUpdateListener() {
			@Override 
			public void onAnimationUpdate(ValueAnimator animation) {
4
CodeRank
This code example shows how to use the following methods:
		else 
			displayBmpToCircleInMap(circleBmp, latLng, radiusM, mapView);
	} 
	 
	private static void displayBmpToCircleInMap(BitmapDescriptor bmp, LatLng latLng, int radiusM, GoogleMap mapView) {
		GroundOverlayOptions options = new GroundOverlayOptions().
	            image(bmp).
	            position(latLng,radiusM*2,radiusM*2).
	            transparency(0.4f);
		final GroundOverlay circle = mapView.addGroundOverlay(options);
		fadeOutCircle(circle);
	} 
 
	private static void fadeOutCircle(final GroundOverlay circle) {
		ValueAnimator animation = ValueAnimator.ofFloat(0, 1);
		animation.setDuration(1000*2);
		animation.setInterpolator(new AccelerateInterpolator(2.0f));
		animation.addUpdateListener(new AnimatorUpdateListener() {
			@Override 
			public void onAnimationUpdate(ValueAnimator animation) {
4
CodeRank

Related Android GroundOverlayOptions Questions & Answers:

See Code Examples for Android GroundOverlayOptions Methods: