I had partial success with my mapping project this weekend.
I had originally planned to map each state with little popup boxes showing details on the numbers for each state. It turns out that I greatly underestimated both my skills with JSON files and the Google APIv3 for maps.
But let me back up. I did have success mapping multiple points on a map. I also successfully mapped a point on a map with a detail window on click (click on the marker to see the details.) However, when I tried to map multiple points on a map with detail boxes, that’s where the train went off the rails.
For reference, here is my JSON data.
var json = [
"detail": "In Virginia, 1254 men were executed between 1620 and 2002; 88 women were executed in this same time frame."
"state": "West Virginia",
"detail": "In West Virginia, 150 men were executed between 1620 and 2002; 4 women were executed in this same time frame.."
"detail": "In Maryland, 293 men were executed between 1620 and 2002; 11 women were executed in this same time frame.."
I’ll continue to try to debug and hack at it to get it to work, but I’m finding the online documentation only partially helpful. One big problem is that I’m not totally confident that I know how to code the start and end to each file. So when I find code snippets of “solutions” to common problems, I’m not entirely sure where to put the code. Since the order is really important, I’m sure I have some things out of order.
Full code examples would be more helpful so that I can see it in context, but I know this is a learning curve problem, and that it will diminish with time. These “help” blog posts are written for experienced coders and right now I’m a hack at best. So for the time being, I’m embracing my hack status and putting this to the side as a problem for another day.