use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class MapillaryPlugin method setWidgetVisible.
public void setWidgetVisible(MapActivity mapActivity, boolean visible) {
if (mapillaryWidgetRegInfo != null) {
final List<ApplicationMode> allModes = ApplicationMode.allPossibleValues();
for (ApplicationMode mode : allModes) {
mapActivity.getMapLayers().getMapWidgetRegistry().setVisibility(mode, mapillaryWidgetRegInfo, visible, false);
}
MapInfoLayer mil = mapActivity.getMapLayers().getMapInfoLayer();
if (mil != null) {
mil.recreateControls();
}
mapActivity.refreshMap();
}
}
use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class ContextMenuScrollFragment method setupMapRulerWidget.
protected void setupMapRulerWidget(@NonNull View view, @NonNull MapLayers mapLayers) {
View mapRulerView = view.findViewById(R.id.map_ruler_layout);
MapInfoLayer mapInfoLayer = mapLayers.getMapInfoLayer();
rulerWidget = mapInfoLayer.setupRulerWidget(mapRulerView);
}
use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class ContextMenuScrollFragment method onDestroyView.
@Override
public void onDestroyView() {
super.onDestroyView();
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
MapLayers mapLayers = mapActivity.getMapLayers();
MapControlsLayer mapControlsLayer = mapLayers.getMapControlsLayer();
mapControlsLayer.removeHudButtons(Arrays.asList(ZOOM_IN_BUTTON_ID, ZOOM_OUT_BUTTON_ID, BACK_TO_LOC_BUTTON_ID));
MapInfoLayer mapInfoLayer = mapLayers.getMapInfoLayer();
mapInfoLayer.removeRulerWidgets(Collections.singletonList(rulerWidget));
}
}
use of net.osmand.plus.views.layers.MapInfoLayer in project Osmand by osmandapp.
the class SnapTrackWarningFragment method setupControlButtons.
private void setupControlButtons(@NonNull View view) {
MapActivity mapActivity = getMapActivity();
View zoomInButtonView = view.findViewById(R.id.map_zoom_in_button);
View zoomOutButtonView = view.findViewById(R.id.map_zoom_out_button);
View myLocButtonView = view.findViewById(R.id.map_my_location_button);
View mapRulerView = view.findViewById(R.id.map_ruler_layout);
MapLayers mapLayers = mapActivity.getMapLayers();
OsmandMapTileView mapTileView = mapActivity.getMapView();
View.OnLongClickListener longClickListener = MapControlsLayer.getOnClickMagnifierListener(mapTileView);
MapControlsLayer mapControlsLayer = mapLayers.getMapControlsLayer();
mapControlsLayer.setupZoomInButton(zoomInButtonView, longClickListener, ZOOM_IN_BUTTON_ID);
mapControlsLayer.setupZoomOutButton(zoomOutButtonView, longClickListener, ZOOM_OUT_BUTTON_ID);
mapControlsLayer.setupBackToLocationButton(myLocButtonView, false, BACK_TO_LOC_BUTTON_ID);
MapInfoLayer mapInfoLayer = mapLayers.getMapInfoLayer();
mapInfoLayer.setupRulerWidget(mapRulerView);
}
Aggregations