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?
Asked
Active
Viewed 186 times
1 Answers
3
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.
CaptDragon
- 13,313
- 6
- 55
- 96
-
Thank you. And what if the site is in WordPress? – againstflow Feb 03 '12 at 17:22
-
I've never used WordPress, sorry. But if it allows you to do javascript, the same way. – CaptDragon Feb 03 '12 at 18:15