All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gwidgets.api.leaflet.events.LocationEvent Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
/**
 *  Copyright 2016 G-Widgets
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.gwidgets.api.leaflet.events;

import com.gwidgets.api.leaflet.LatLng;
import com.gwidgets.api.leaflet.LatLngBounds;


/**
 * The Class LocationEvent.
 * @author Zakaria Amine
 */
public class LocationEvent extends Event {

	
	protected LocationEvent(){}



	/**
	 * Gets the detected geographical location of the user.
	 *
	 * @return the latlng
	 */
	public final native LatLng getLatlng() /*-{
		return this.latlng;
	}-*/;

	/**
	 * Gets the geographical bounds of the area user is located in (with respect to the accuracy of location).
	 *
	 * @return the bounds
	 */
	public final native LatLngBounds getBounds() /*-{
		return this.bounds;
	}-*/;

	/**
	 * Gets the accuracy of location in meters.
	 *
	 * @return the accuracy
	 */
	public final native double getAccuracy() /*-{
		return this.accuracy;
	}-*/;

	/**
	 * Gets the height of the position above the WGS84 ellipsoid in meters.
	 *
	 * @return the altitude
	 */
	public final native double getAltitude() /*-{
		return this.altitude;
	}-*/;

	/**
	 * Gets the accuracy of the altitude in meters.
	 *
	 * @return the altitude accuracy
	 */
	public final native double getAltitudeAccuracy() /*-{
		return this.altitudeAccuracy;
	}-*/;

	/**
	 * Gets the direction of travel in degrees counting clockwise from true North.
	 *
	 * @return the heading
	 */
	public final native double getHeading() /*-{
		return this.heading;
	}-*/;

	/**
	 * Gets the current velocity in meters per second.
	 *
	 * @return the speed
	 */
	public final native double getSpeed() /*-{
		return this.speed;
	}-*/;

	/**
	 * Gets the time when the position was acquired.
	 *
	 * @return the timestamp
	 */
	public final native double getTimestamp() /*-{
		return this.timestamp;
	}-*/;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy