use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class ParkingPositionPlugin method updateLayers.
@Override
public void updateLayers(@NonNull Context context, @Nullable MapActivity mapActivity) {
if (mapActivity == null) {
return;
}
if (isActive()) {
if (parkingPlaceControl == null) {
registerWidget(mapActivity);
}
} else {
MapInfoLayer mapInfoLayer = mapActivity.getMapLayers().getMapInfoLayer();
if (mapInfoLayer != null && parkingPlaceControl != null) {
mapInfoLayer.removeSideWidget(parkingPlaceControl);
mapInfoLayer.recreateControls();
parkingPlaceControl = null;
}
}
}
use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class MapActivity method showTopToolbar.
public void showTopToolbar(@NonNull TopToolbarController controller) {
MapInfoLayer mapInfoLayer = getMapLayers().getMapInfoLayer();
mapInfoLayer.addTopToolbarController(controller);
updateStatusBarColor();
}
use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class MapActivity method hideTopToolbar.
public void hideTopToolbar(@NonNull TopToolbarController controller) {
MapInfoLayer mapInfoLayer = getMapLayers().getMapInfoLayer();
mapInfoLayer.removeTopToolbarController(controller);
updateStatusBarColor();
}
use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class OsmandMonitoringPlugin method registerWidget.
private void registerWidget(@NonNull MapActivity activity) {
MapInfoLayer layer = activity.getMapLayers().getMapInfoLayer();
monitoringControl = createMonitoringControl(activity);
layer.registerSideWidget(monitoringControl, R.drawable.ic_action_play_dark, R.string.map_widget_monitoring, "monitoring", false, 30);
layer.recreateControls();
}
use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class OsmandMonitoringPlugin method updateLayers.
@Override
public void updateLayers(@NonNull Context context, @Nullable MapActivity mapActivity) {
if (mapActivity != null) {
if (isActive()) {
if (monitoringControl == null) {
registerWidget(mapActivity);
}
} else {
if (monitoringControl != null) {
MapInfoLayer layer = mapActivity.getMapLayers().getMapInfoLayer();
layer.removeSideWidget(monitoringControl);
layer.recreateControls();
monitoringControl = null;
}
}
}
}
Aggregations