use of net.osmand.core.samples.android.sample1.data.PointDescription in project Osmand by osmandapp.
the class MenuController method getMenuController.
public static MenuController getMenuController(MainActivity mainActivity, LatLon latLon, PointDescription pointDescription, Object object, MenuType menuType) {
SampleApplication app = mainActivity.getMyApplication();
MenuController menuController = null;
if (object != null) {
if (object instanceof Amenity) {
menuController = new AmenityMenuController(mainActivity, pointDescription, (Amenity) object);
} else if (object instanceof LatLon) {
if (pointDescription.isMyLocation()) {
menuController = new MyLocationMenuController(mainActivity, pointDescription);
}
}
}
if (menuController == null) {
menuController = new PointDescriptionMenuController(mainActivity, pointDescription);
}
menuController.menuType = menuType;
menuController.setLatLon(latLon);
return menuController;
}
Aggregations