I get this error when I try to display the data.I would like to retrieve and display the stations around me.here is my code.I get this as an error nvalidArgumentError: H.map.AbstractMarker#setGeometry (Argument #0 [object Object])
const requestStations=()=>{
var center=JSON.parse(localStorage.getItem('center'));
var url = `https://browse.search.hereapi.com/v1/browse?apiKey=f-jhHQAK5b0Fykw9GhBPn2XIhyLUq9INnxN5Er0aY28&at=${center.coordinates[1]},${center.coordinates[0]}&limit=5&categories=400-4100-0035`;
return new Promise((resolve, reject) => {fetch(url, {
method: 'get',
}).then((response) =>
response.json().then((response) => {
let markerGroup = new H.map.Group();
let markers=[];
alert(response.items[0].title);
console.log(response.items[1].title);
response.items.forEach((station) => {
let marker = new H.map.Marker({lat:station.access.lat,lng:station.access.lng});
markerGroup.addObject(marker);
//alert(JSON.stringify({lat:station.coord.lat,lng:station.coord.lon}));
markers.push(marker);
});
map.addObject(markerGroup);
map.getViewModel().setLookAtData({
bounds: markerGroup.getBoundingBox()
});
resolve(markers)
})).catch(error=>{
alert(error);
reject(error);
console.log(error);}
)});
}