refactor : remove comments
This commit is contained in:
parent
8a36517f08
commit
3ab47584bb
1 changed files with 0 additions and 6 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
// src/Methods/addMarker.ts
|
|
||||||
|
|
||||||
import Feature from 'ol/Feature';
|
import Feature from 'ol/Feature';
|
||||||
import Point from 'ol/geom/Point';
|
import Point from 'ol/geom/Point';
|
||||||
|
|
@ -9,16 +8,11 @@ import Icon from 'ol/style/Icon';
|
||||||
import { Map } from 'ol';
|
import { Map } from 'ol';
|
||||||
import { Coordinate } from 'ol/coordinate';
|
import { Coordinate } from 'ol/coordinate';
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a custom icon marker to the map at a given coordinate,
|
|
||||||
* replacing the previous marker layer if one exists.
|
|
||||||
*/
|
|
||||||
export const addMarker = (
|
export const addMarker = (
|
||||||
coords: Coordinate,
|
coords: Coordinate,
|
||||||
map: Map,
|
map: Map,
|
||||||
existingMarkerLayer: VectorLayer | null
|
existingMarkerLayer: VectorLayer | null
|
||||||
): VectorLayer => {
|
): VectorLayer => {
|
||||||
// Create feature for the marker
|
|
||||||
const markerFeature = new Feature({
|
const markerFeature = new Feature({
|
||||||
geometry: new Point(coords),
|
geometry: new Point(coords),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue