use of net.osmand.plus.views.OsmandMap in project Osmand by osmandapp.
the class MapControlsLayer method setupZoomInButton.
public MapHudButton setupZoomInButton(View zoomInButton, OnLongClickListener longClickListener, String buttonId) {
MapHudButton mapZoomInButton = createHudButton(zoomInButton, R.drawable.ic_zoom_in, buttonId);
mapZoomInButton.setRoundTransparent();
zoomInButton.setOnLongClickListener(longClickListener);
zoomInButton.setOnClickListener(v -> {
if (requireMapActivity().getContextMenu().zoomInPressed()) {
return;
}
OsmandMap osmandMap = app.getOsmandMap();
if (mapView.isZooming()) {
osmandMap.changeZoom(2, System.currentTimeMillis());
} else {
osmandMap.changeZoom(1, System.currentTimeMillis());
}
lastZoom = System.currentTimeMillis();
});
controls.add(mapZoomInButton);
return mapZoomInButton;
}
Aggregations