I’m trying to integrate a map location API using HERE Maps API @here/maps-api-for-javascript latest version(“@here/maps-api-for-javascript”: “^1.54.1”) in a Reactjs project. App created with vite bundler, and uses TypeScript for development.
When I run npm run build, I get the error: “Property ‘vector’ does not exist on type ‘Layer’.ts(2339)” in the below code:
const newMap = new H.Map(
mapRef.current,
defaultLayers.vector.normal.map,
{
pixelRatio: 2,
zoom: 17,
center: position,
}
);
can HERE Developer Support help?
If you’d like me to provide more context, I’d be more than happy to do so, please.
I’ve tried several configurations including using type assertion as below:
const defaultLayers = platform.createDefaultLayers(512, 320) as H.map.layer.Layer
Richard Omeje is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.