diff --git a/src/App.js b/src/App.js index 166c95fb3cdba8eadb53b6d368fbbc397761cfa4..7f1245d010b90dbc1da6ea71e6eadce955877590 100644 --- a/src/App.js +++ b/src/App.js @@ -25,8 +25,4 @@ class App extends Component { } } -function onChange(geojson) { - console.log("geojson changed", geojson); -} - export default App; diff --git a/src/components/DrawTools.js b/src/components/DrawTools.js index 2d0b701d98e2ad4997da1de023fe4f39765eff09..23fb46aec2a610128b8d34fe767cc8cffe0fde78 100644 --- a/src/components/DrawTools.js +++ b/src/components/DrawTools.js @@ -1,10 +1,7 @@ import React, {Component} from 'react'; import {Â EditControl } from "react-leaflet-draw" -import L from 'leaflet'; import { FeatureGroup, - GeoJSON, - Marker } from 'react-leaflet' class DrawTools extends Component { @@ -12,7 +9,7 @@ class DrawTools extends Component { let type = e.layerType; let layer = e.layer; let geoJSON = layer.toGeoJSON(); - console.log(JSON.stringify(geoJSON, null, 4)); + console.log(JSON.stringify(geoJSON, null, 4)); // makes the output readable in the console this._onChange(); } @@ -25,7 +22,11 @@ class DrawTools extends Component { onCreated={this._onCreated} draw={{ circle: { - repeatMode: true // allows using the tool again after finishing the previous shape + repeatMode: true, // allows using the tool again after finishing the previous shape + shapeOptions: { + color: '#f9f10c', + opacity: 100 + } }, rectangle: { repeatMode: true @@ -38,11 +39,16 @@ class DrawTools extends Component { message: '<strong>Oh snap!<strong> you can\'t draw that!' // Message that will show when intersect }, shapeOptions: { - color: '#97009c' + color: '#ed2572', + opacity: 100 } }, polyline: { - repeatMode: true + repeatMode: true, + shapeOptions: { + color: '#ed2572', + opacity: 100 + } }, marker: { repeatMode: true diff --git a/src/components/UserMap.js b/src/components/UserMap.js index fc66dc9b16d7639bf00fb73cb94c16f193d8486b..40bc4232c3f2f51e99d9dac09cc70b51594ce1af 100644 --- a/src/components/UserMap.js +++ b/src/components/UserMap.js @@ -1,6 +1,5 @@ import React, {Component} from 'react'; import { - GeoJSON, Map, TileLayer, ZoomControl @@ -18,7 +17,7 @@ class UserMap extends Component { > <TileLayer attribution='Maanmittauslaitoksen kartta' - url=" https://tiles.kartat.kapsi.fi/taustakartta/{z}/{x}/{y}.jpg" + url=" https://tiles.kartat.kapsi.fi/peruskartta/{z}/{x}/{y}.png" />' <ZoomControl position='topright' /> <DrawTools position={this.props.position} />