Wednesday, July 25, 2012

Google Maps API multiple markers and infowindows

I was having trouble with binding InfoWindows to markers. No matter which marker was clicked, the InfoWindow for the last marker to be created was displayed.  I found the answer to the problem here:
http://stackoverflow.com/questions/2357323/trying-to-bind-multiple-infowindows-to-multiple-markers-on-a-lgoogle-map-and-fail

Simply creating a separate function to add the event listener solved the problem.

Wednesday, July 18, 2012

January Drupal frustration solved.

I posted on January 16 about problems integrating Drupal 7 with an external website. I had to set it aside and work on other things until this week. I finally located the cause of the problem today. As are most time-consuming problems, this had a simple solution. I just had to step away from it long enough to reset, then look through the code with a fresh outlook.

The culprit in this case was running the Drupal login function targeted at http://www.mydomain.com, but then trying to retrieve the Drupal node from http://mydomain.com. Since the domain didn't match, my session auth failed.