I am working with the google maps API and I am trying to convert the map object into a JSON string to store it in local storage. For some reason when I run this block of code the second console.log never runs and when I look in local storage it still says [object Object] meaning the JSON.strigify() never worked.
map = new window.google.maps.Map(document.getElementById('map'), {
center: this.state.center,
zoom: 8.5
});
console.log(map);
let jsonMap = JSON.stringify(map);
console.log(jsonMap);
I could be missing something very obvious but I just can't see it.
Cheers,