Embedding Google Maps in 2 Easy Steps

mapper1 Embedding Google Maps in 2 Easy Stepshttp://bluecowhosting.com/blog/wp-content/uploads/2010/05/mapper1-300x160.jpg 300w" sizes="(max-width: 563px) 100vw, 563px" />

A common question is asked is how do I embed google maps into your blog posts. There are two answers, the easy answer (which is here) and the hard answer which means you need to be a programmer.

Google has a Mapping API that provides an extremely comprehensive way of embedding and manipulating maps. The book I recommend for this is Beginning Google Maps Applications with PHP and Ajax: From Novice to Professional.

ap google map Embedding Google Maps in 2 Easy Stepshttp://bluecowhosting.com/blog/wp-content/uploads/2010/05/ap_google_map-227x300.jpg 227w" sizes="(max-width: 252px) 100vw, 252px" />

This is probably the most comprehensive but readable primer to developing using the Google Maps API version 2. Version 3 was released late last year and it importantly includes mobile support including getting location information for mobile applications. A new version of the book is due out soon that includes the new version 3.

Until recently, building interactive web-based mapping applications has been a cumbersome affair. This changed when Google released its powerful Maps API. Beginning Google Maps Applications with PHP and Ajax was written to help you take advantage of this technology in your own endeavorswhether you’re an enthusiast playing for fun or a professional building for profit. This book covers version 2 of the API, including Google’s new Geocoding service.

Authors Jeffrey Sambells, Cameron Turner, and Michael Purvis get rolling with examples that require hardly any code at all, but you’ll quickly become acquainted with many facets of the Maps API. They demonstrate powerful methods for simultaneously plotting large data sets, creating your own map overlays, and harvesting and geocoding sets of addresses. You’ll see how to set up alternative tile sets and where to access imagery to use for them. The authors even show you how to build your own geocoder from scratch, for those high-volume batch jobs.

The easy way is to use Google’s built in tools. If you look at the picture above you can see a link on the very right hand side.

So find the location that you want to map, then click on “Link”.

map2 Embedding Google Maps in 2 Easy Stepshttp://bluecowhosting.com/blog/wp-content/uploads/2010/05/map2-300x158.jpg 300w" sizes="(max-width: 519px) 100vw, 519px" />

This automatically creates the code you need to embed into your post. Either a link or it uses an iframe to embed some HTML into your post. Remember, before you insert switch to HTML mode in the editor.

If you want to customize the layout click on “Customize and preview embedded Map” and modify the settings. Then cut and paste into your post.  That’s it.

map31 Embedding Google Maps in 2 Easy Stepshttp://bluecowhosting.com/blog/wp-content/uploads/2010/05/map31-209x300.jpg 209w" sizes="(max-width: 514px) 100vw, 514px" />

Related Posts: