当前位置: 首页>>代码示例>>Java>>正文


Java LatLong.equals方法代码示例

本文整理汇总了Java中org.mapsforge.core.model.LatLong.equals方法的典型用法代码示例。如果您正苦于以下问题:Java LatLong.equals方法的具体用法?Java LatLong.equals怎么用?Java LatLong.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.mapsforge.core.model.LatLong的用法示例。


在下文中一共展示了LatLong.equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializePosition

import org.mapsforge.core.model.LatLong; //导入方法依赖的package包/类
/**
 * initializes the map view position.
 * 
 * @param mvp
 *            the map view position to be set
 * @return the mapviewposition set
 */
protected MapViewPosition initializePosition(MapViewPosition mvp) {
	LatLong center = mvp.getCenter();

	if (center.equals(new LatLong(0, 0))) {
		mvp.setMapPosition(this.getInitialPosition());
	}
	mvp.setZoomLevelMax((byte) 24);
	mvp.setZoomLevelMin((byte) 7);
	return mvp;
}
 
开发者ID:nirabpudasaini,项目名称:Mero-Bhada-Meter,代码行数:18,代码来源:OfflineMapActivity.java

示例2: initializePosition

import org.mapsforge.core.model.LatLong; //导入方法依赖的package包/类
private MapViewPosition initializePosition(MapViewPosition mvp) {
    LatLong center = mvp.getCenter();

    if (center.equals(new LatLong(0, 0))) {
        mvp.setMapPosition(this.getInitialPosition());
    }
    return mvp;
}
 
开发者ID:marunjar,项目名称:anewjkuapp,代码行数:9,代码来源:MapFragment.java

示例3: onCreate

import org.mapsforge.core.model.LatLong; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	//if (DEBUG) Log.d(TAG, "Fawlty.onCreate");
	super.onCreate(savedInstanceState);
	if (savedInstanceState != null) {
		enabled = savedInstanceState.getBoolean(STATE_ENABLED);
	}
	last_latLong = new LatLong(0, 0);
	last_latLong_tower = null;
	wirelessEnvListener = new WirelessEnvListener(getActivity()) {
		@Override
		public void onLocationChanged(Location location, String ident) {
			//if (DEBUG) Log.d(TAG, "got it location=" + location + ", ident=" + ident + ", last_ident=" + Fawlty.this.last_ident);
			last_latLong = new LatLong(location.getLatitude(), location.getLongitude());
			if (location.getExtras().containsKey("latitude_tower")) {
				last_latLong_tower = new LatLong(location.getExtras().getDouble("latitude_tower"), location.getExtras().getDouble("longitude_tower"));
			} else {
				last_latLong_tower = null;
			}
			float accuracy = location.getAccuracy();
			long rcd = location.getExtras().getLong("rcd", 5000);
			if (!ident.equals(Fawlty.this.last_ident) || !last_latLong.equals(circle.getPosition())) {
				circle.setLatLong(last_latLong);
				if (rcd == 2000) {
					circle.setRadius(accuracy);
					if (last_latLong_tower != null) {
						marker.setLatLong(last_latLong_tower);
						marker.setVisible(true);
					} else {
						marker.setVisible(false);
					}
					circle.setVisible(true);
				} else {
					circle.setVisible(false);
					marker.setVisible(false);
					getActivity().runOnUiThread(new Runnable() {
						public void run() {
							Toast.makeText(getActivity(), "Ident: " + last_ident + " not found", Toast.LENGTH_LONG).show();
						}
					});
				}
				Fawlty.this.last_ident = ident;
				//if (DEBUG) Log.d(TAG, "location set");
				Bundle extra = new Bundle();
				extra.putString("cell_ident", ident);
				((Tabulae) getActivity()).inform(R.id.event_notify_cell, extra);
			}
		}
	};
}
 
开发者ID:emdete,项目名称:tabulae,代码行数:51,代码来源:Fawlty.java


注:本文中的org.mapsforge.core.model.LatLong.equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。