Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
Thank you. And what if the site is in WordPress? –  againstflow Feb 3 '12 at 17:22
    
I've never used WordPress, sorry. But if it allows you to do javascript, the same way. –  CaptDragon Feb 3 '12 at 18:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.