|
@@ -3,6 +3,7 @@ import Map from "pigeon-maps";
|
|
|
import Marker from "pigeon-marker";
|
|
|
import Overlay from "pigeon-overlay";
|
|
|
import {longitude, latitude, mapWidth, mapHeight} from "./config/variables";
|
|
|
+import {Button} from "reactstrap";
|
|
|
|
|
|
export default class Pigeon extends React.Component{
|
|
|
providers = {
|
|
@@ -15,12 +16,12 @@ export default class Pigeon extends React.Component{
|
|
|
return `https://stamen-tiles.a.ssl.fastly.net/terrain/${z}/${x}/${y}${dpr >= 2 ? '@2x' : ''}.jpg`
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
zoomIn = () => {
|
|
|
let newZoom = Math.min(this.props.mapConfig.zoom + 1, 22)
|
|
|
this.props.updateMapState("zoom", newZoom)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
zoomOut = () => {
|
|
|
let newZoom = Math.max(this.props.mapConfig.zoom - 1, 0)
|
|
|
this.props.updateMapState("zoom", newZoom)
|
|
@@ -69,10 +70,10 @@ export default class Pigeon extends React.Component{
|
|
|
</div>
|
|
|
|
|
|
<div className="mapInfo">
|
|
|
- <button onClick={this.zoomIn}>+</button>
|
|
|
- <button onClick={this.zoomOut}>-</button>
|
|
|
- <button onClick={this.removeMarkers}>Clear path</button>
|
|
|
- <button onClick={this.props.getDistance}>Calculate Distance</button>
|
|
|
+ <Button onClick={this.zoomIn}>+</Button>
|
|
|
+ <Button onClick={this.zoomOut}>-</Button>
|
|
|
+ <Button onClick={this.removeMarkers}>Clear path</Button>
|
|
|
+ <Button onClick={this.props.getDistance}>Calculate Distance</Button>
|
|
|
<p>
|
|
|
Distanz: {Math.round(mapConfig.distance*100)/100} km
|
|
|
</p>
|