Google has been doing incredible work to advance the proposed web component standard with their Polymer project. Web components let web developers define their own HTML tags, and Polymer is a framework for creating and using those components1.
If you’re using Polymer’s Google Map component, the code gets a lot simpler3:
See a demo of the above code.
If you want to know more, Google engineer Eric Bidelman explains the map component in this video:
Unfortunately, we can only use Polymer on bleeding edge browsers, but I look forward to using it and web components in the future.