This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -63,39 +63,6 @@ export const createMarker = (coords: GeolocationCoordinates, element: HTMLElemen
63
63
return marker ;
64
64
} ;
65
65
66
- export const createMapWithCoords = (
67
- coords : GeolocationCoordinates ,
68
- interactive : boolean ,
69
- bodyId : string ,
70
- markerId : string ,
71
- onError : ( error : Error ) => void ,
72
- ) : maplibregl . Map => {
73
- try {
74
- const map = createMap ( interactive , bodyId , onError ) ;
75
-
76
- const coordinates = new maplibregl . LngLat ( coords . longitude , coords . latitude ) ;
77
- // center on coordinates
78
- map . setCenter ( coordinates ) ;
79
-
80
- const marker = createMarker ( coords , document . getElementById ( markerId ) ) ;
81
- marker . addTo ( map ) ;
82
-
83
- map . on ( 'error' , ( e ) => {
84
- logger . error (
85
- "Failed to load map: check map_style_url in config.json has a "
86
- + "valid URL and API key" ,
87
- e . error ,
88
- ) ;
89
- onError ( new Error ( LocationShareError . MapStyleUrlNotReachable ) ) ;
90
- } ) ;
91
-
92
- return map ;
93
- } catch ( e ) {
94
- logger . error ( "Failed to render map" , e ) ;
95
- onError ( e ) ;
96
- }
97
- } ;
98
-
99
66
const makeLink = ( coords : GeolocationCoordinates ) : string => {
100
67
return (
101
68
"https://www.openstreetmap.org/" +
You can’t perform that action at this time.
0 commit comments