Have you looked into making an iFrame to hold the map stuff?
It ought to be possible to make an iFrame to override the content type, and then write your map stuff in there.
The easy way to do this would be to have the iFrame actually be on the page with no source set, for example
<iframe id="iframe_id" src="" type="text/html"></iframe>
var iFrame = document.frames["iframe_id"];
the 'iFrame.document' code only works in some browsers, but there are equivalents to it in pretty much everything.
Hope this is helpful.