fixed adaptive zoom

This commit is contained in:
Fedor Katurov 2020-02-11 15:38:53 +07:00
parent a1c55befa2
commit 3ca211b9bb
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ interface IProps {
const Stickers: FC<IProps> = memo(({ stickers, is_editing, mapSetSticker, mapDropSticker }) => {
const [layer, setLayer] = useState<FeatureGroup>(null);
const [zoom, setZoom] = useState(16);
const [zoom, setZoom] = useState(MainMap.getZoom());
const onZoomChange = useCallback(
(event) => {

View file

@ -14,5 +14,5 @@ export const getRandomColor = () => {
}
export const getAdaptiveScale = (zoom: number): number => (
Math.min(1, Math.max(0.4, 1 / (2 ** (13 - zoom))))
Math.min(1, Math.max(0.4, 1.5 / (2 ** (13 - zoom))))
);