本文整理汇总了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;
}
示例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;
}
示例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);
}
}
};
}