Skip to content

Commit 2c7e260

Browse files
committed
Added default layer and view to map.tsx, so that users doesn't need to add them
1 parent 3a017e1 commit 2c7e260

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/Map.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from 'react';
1010
import {defaults as defaultControls} from 'ol/control/defaults.js';
1111
import { Map as OlMap } from 'ol';
12-
import View from 'ol/View';
12+
import View from 'ol/View';
1313
import './ol.css';
1414
import './Map.css';
1515
import TileLayer from 'ol/layer/Tile';
@@ -35,7 +35,7 @@ export const Map = forwardRef<OlMap | undefined, MapProps>((props, ref) => {
3535
useImperativeHandle(ref, () => map, [map]);
3636

3737
const mounted = useRef(false);
38-
const defaultLayer = new TileLayer({ source: new OSM() });
38+
const defaultLayer = new TileLayer({ source: new OSM() });
3939

4040
useEffect(() => {
4141
if (!mapRef.current || mounted.current) return;

0 commit comments

Comments
 (0)