If you are having trouble spotting the problem, please send a copy of the map_view.php page so I can examine the code.
Yes, I noticed that. That was one primary difference between the first (successful) run and subsequent (failed) runs. Whoever developed the site did many naughty things such as closing open tags inside SSI includes, etc. I wonder if that is what is throwing things off.
I will move the script tags and see what happens.