If you want to do this in your own hosted version of a Wordpress site, as @iriberri has suggested, I will assume you have your own hosting account for files separate from your Wordpress site, that is, you can create directories on your web server and host HTML, CSS and JS files, etc.
Assuming this, you should be able to create the map you want to embed on your site as a full-frame HTML page (ie. the map goes to 100% width and height of the HTML page), and include all the custom functionality you want to show on the wordpress page in which the map is to be embedded (ie. the code you referenced above).
Once this simple map page has been built, upload the files to your web server in a directory structure like
With this HTML page built, you should, again as iriberri suggested, use an iFrame to simply embed the
myMap.html into your Wordpress post like this:
<iframe src="http://yoursever/simplemap/myMap.html" height="100" width="200"></iframe>
That should do it!