Getting a google map marker from localStorage?
Hi,
If I use the click event of a google map marker to place it in local storage how would I use it? Will it be as simple as:
- function setactivemarker() {
- var activemarker = JSON.parse(localStorage.getItem("activemarker"));
-
- activemarker.setMap(MYDIRMAP.map); // this is a different map than the original one the marker was placed on and I want to reassign it the preceding map.
- }
Do I need to use JSON.stringify when I store the active marker? What will activemarker actually be?
Thanks for any help.