fix: errors

This commit is contained in:
Kieran 2023-12-31 22:21:56 +00:00
parent 019e5019c8
commit 45d0d287e0
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import H from '@here/maps-api-for-javascript';
import { useEffect, useRef } from 'react';
@ -9,6 +10,7 @@ export function HereMap(props: { zoom?: number, markers?: Array<{ lat: number, l
useEffect(
() => {
if (!map.current) {
//@ts-expect-error
platform.current = new H.service.Platform({ apikey: "5uZZsWJdVyMSDTjjNJNyUgKq_bKv2rVVZWAXnfmgttQ" });
const rasterTileService = platform.current.getRasterTileService({
@ -32,6 +34,7 @@ export function HereMap(props: { zoom?: number, markers?: Array<{ lat: number, l
new H.mapevents.Behavior(
new H.mapevents.MapEvents(newMap)
);
//@ts-expect-error
map.current = newMap;
}
}, [props]