summaryrefslogtreecommitdiff
path: root/frontend/src/components/app/map/controls/ScaleIndicatorComponent.js
blob: daaf8ec6a3f359ea52f3d64910e30a9cc90dd874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import React from 'react'
import { TILE_SIZE_IN_METERS, TILE_SIZE_IN_PIXELS } from '../MapConstants'
import './ScaleIndicatorComponent.css'

const ScaleIndicatorComponent = ({ scale }) => (
    <div
        className="scale-indicator"
        style={{ width: TILE_SIZE_IN_PIXELS * scale }}
    >
        {TILE_SIZE_IN_METERS}m
    </div>
)

export default ScaleIndicatorComponent