Openlayers3 knows the actual distance, how to calculate the pixel distance on the screen?

use openlayers3 for map positioning, now the range of map positioning is 1km, how to calculate the pixel distance of 1km at the current level on the map? Or how to get the current level scale. Ol rookie, ask the gods for help

Mar.24,2021
Menu