blob: ef63376403b51d195b3b151bee0e176f4a70a4c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import PropTypes from 'prop-types'
import React from 'react'
import { TILE_SIZE_IN_METERS, TILE_SIZE_IN_PIXELS } from '../MapConstants'
import { scaleIndicator } from './ScaleIndicatorComponent.module.scss'
const ScaleIndicatorComponent = ({ scale }) => (
<div className={scaleIndicator} style={{ width: TILE_SIZE_IN_PIXELS * scale }}>
{TILE_SIZE_IN_METERS}m
</div>
)
ScaleIndicatorComponent.propTypes = {
scale: PropTypes.number.isRequired,
}
export default ScaleIndicatorComponent
|