I'm trying to create a map with approximately 40 markers. Each marker
is geocoded and has an event handler for 'clicked' that redirects to a
new page. I've pretty much used the geocoding code straight from the
Google API v3 site, but the code fails if I add more than 10 markers.
On the 11th, I get a Javascript error. If I try to show more than 11,
then all the markers disappear.
I receive a rather useless (to me at least) error message: '0' is null
or not an object.
If I take out the event handler, the problem remains so it seems to be
connected to the geocoding. I think it has something to do with these
lines:
geocoder13.geocode( { 'address': '6059 S Seneca,Wichita,KS,67217'},
function(results, status) {
var marker13 = new google.maps.Marker({
map: map,
position: results[0].geometry.location,
title:"Cox Farm"
});
});
In particular, if I remove the stuff after function(results, status)
{ up to the next }, I don't get an error. Of course I also don't get
any markers!
I tried with each geocoding occurence listed separately, which you can
see here:
http://cornmaze.moderntymes.com/map.htm
I also tried making a function to do the geocoding here:
http://cornmaze.moderntymes.com/map_testgc.htm
Results are the same either way.