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