The code for google search box above can be easily generated and copied from: https://www.google.com/cse/all.
The advantage to taking this route is when users perform a search, they do not leave your page.
The search box in the navigation bar uses a simple form and assigns google.com as the value of the action attribute. When taking this route, it is very easy to create styles;however, the disadvantage is users are forced to leave your page when performing a search!
The map below demonstrates integrating a Google map into a webpage. Code to embed maps can be easily generated by going to maps.google.com/, searching a map, and then using the 'link' icon to get the code.