Well, here’s the misbehaving map
edited to not drive more traffic than necessary to in_dev site
I don’t even know where to begin. Javascript has never been my strong suit, and this is making me pull my hair out.
Here’s the code:
jQuery(document).ready(function($)
{
var options = {
maptype: G_PHYSICAL_MAP,
controls: false,
zoom: 3
};
var shows = new Array();
var i = 0;
$('.show-item').each(function()
{
showLocation = $(this).find('.show-location').html();
description = "<em>" + $(this).find('.show-date').html() + "</em>";
description += $(this).find('.show-title').html(); description += "<br />";
description += $(this).find('.show-description').html();
if($(this).find('.ticket-link').length > 0)
{
description += $(this).find('.ticket-link').html();
}
shows[i] = {address: showLocation, html: description};
i++;
});
options.markers = shows;
console.log(options);
$("#map").gMap(options);
});
Thanks!
You’re getting 620 status codes back from Google, which means that you’re querying too fast –the javascript is asking the GeoCoder for LatLng on your base-level addresses too many times per second.
The solution is to pre-bake the Lat/Lng into the data somehow. I know it sounds like a pain, but you’ll have to do that or add your markers dynamically on a timer.
Based on how I read the responses, btw, looks like you can do a batch of 20 at a time — no more.