summaryrefslogtreecommitdiff
path: root/src/components/app/map/controls/ScaleIndicatorComponent.js
blob: fd9483b5fb5e5fa7760efb75290f4b56f8a28b7d (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;