I was trying to implement HERE maps to my website, but I encountered a problem. As I mount the map, only HERE logo on the bottom left is shown, but the area where the map is supposed to be is empty. I get no errors. I'm also using Vue.JS, but I'm mounting the map in mounted() method (see code below).
`
<template>
<div class="here-map">
<div ref="map" id="mapContainer" v-bind:style="{ width: width, height: height }"></div>
</div>
</template>
<script>
export default {
name: "HereMap",
data() {
return {
map: {},
platform: {}
}
},
props: {
lat: String,
lng: String,
width: String,
height: String
},
created() {
this.platform = new H.service.Platform({
apikey: "myApiKey"
});
},
mounted() {
const maptypes = this.platform.createDefaultLayers();
this.map = new H.Map(
document.getElementById('mapContainer'),
maptypes.vector.normal.map,
{
center: {lat:50, lng:5},
zoom: 4,
pixelRatio: window.devicePixelRatio || 1
});
}
}
</script>
`
