|
1 | | -import {FunctionComponent} from "react" |
2 | | - |
3 | | -import {Icon, LatLng} from 'leaflet' |
4 | | -import markerIcon2xPng from 'leaflet/dist/images/marker-icon-2x.png' |
5 | | - |
6 | | -import markerIconPng from 'leaflet/dist/images/marker-icon.png' |
7 | | -import markerShadowPng from 'leaflet/dist/images/marker-shadow.png' |
8 | | -import 'leaflet/dist/leaflet.css' |
9 | | - |
10 | | -import { MapContainer, TileLayer} from 'react-leaflet' |
11 | | - |
12 | | -const disruptorBuildingLocation = new LatLng(51.44971831403754, 5.4947035381928035) |
13 | | - |
14 | | -// fix marker image (not sure we're ever gonna use this) |
15 | | -// alternatively assign to Marker.prototype.options.icon.options |
16 | | -Icon.Default.mergeOptions({ |
17 | | - iconUrl: markerIconPng, |
18 | | - iconRetinaUrl: markerIcon2xPng, |
19 | | - shadowUrl: markerShadowPng, |
20 | | -}) |
21 | | - |
22 | | -export const Map: FunctionComponent = () => ( |
23 | | - <MapContainer center={disruptorBuildingLocation} |
24 | | - zoom={13} |
25 | | - scrollWheelZoom={true} |
26 | | - style={{height: "500px"}}> |
27 | | - <TileLayer |
28 | | - attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' |
29 | | - // TODO: option to use BAG WMS tiles |
30 | | - url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" |
31 | | - /> |
32 | | - </MapContainer> |
33 | | -) |
| 1 | +// import {FunctionComponent} from "react" |
| 2 | +// |
| 3 | +// import {Icon, LatLng} from 'leaflet' |
| 4 | +// import markerIcon2xPng from 'leaflet/dist/images/marker-icon-2x.png' |
| 5 | +// |
| 6 | +// import markerIconPng from 'leaflet/dist/images/marker-icon.png' |
| 7 | +// import markerShadowPng from 'leaflet/dist/images/marker-shadow.png' |
| 8 | +// import 'leaflet/dist/leaflet.css' |
| 9 | +// |
| 10 | +// import { MapContainer, TileLayer} from 'react-leaflet' |
| 11 | +// |
| 12 | +// const disruptorBuildingLocation = new LatLng(51.44971831403754, 5.4947035381928035) |
| 13 | +// |
| 14 | +// // fix marker image (not sure we're ever gonna use this) |
| 15 | +// // alternatively assign to Marker.prototype.options.icon.options |
| 16 | +// Icon.Default.mergeOptions({ |
| 17 | +// iconUrl: markerIconPng, |
| 18 | +// iconRetinaUrl: markerIcon2xPng, |
| 19 | +// shadowUrl: markerShadowPng, |
| 20 | +// }) |
| 21 | +// |
| 22 | +// export const Map: FunctionComponent = () => ( |
| 23 | +// <MapContainer center={disruptorBuildingLocation} |
| 24 | +// zoom={13} |
| 25 | +// scrollWheelZoom={true} |
| 26 | +// style={{height: "500px"}}> |
| 27 | +// <TileLayer |
| 28 | +// attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' |
| 29 | +// // TODO: option to use BAG WMS tiles |
| 30 | +// url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" |
| 31 | +// /> |
| 32 | +// </MapContainer> |
| 33 | +// ) |
0 commit comments