I have Google Map and a lot of markers. Is there possibility to add feature when user clicks on marker and Info Window shows up, that user has option to add that location to wishlist and associate that to either a user ID/cookie?
1 Answer
Absolutely. Simply save the info into an array. whether it be the marker object, the coordinates (so you can later recreate the marker), or a combination of both with extra information in your own object. I would go with a markup like geoJSON and save it into an array.
var mySavedMarkers = [];
mySavedMarkers.push(aMarker);
You can then send mySavedMarkers[]
to the Database via Ajax, save it in session, cookie, file, or whatever you want.
-
-
I've never used WordPress, sorry. But if it allows you to do javascript, the same way. Commented Feb 3, 2012 at 18:15