How to add Google Maps to your website
Google maps provide a very good API so you can show google maps on your website. Most webmasters are using google maps to help customers find the location of their business ( usually on contact pages ). Others are building full applications based on google maps. It is very easy to implement google maps on any website.
Reading on Google Documentation website may be confusing. I will compile few easy steps to get started with your first google maps application. First, you need a Google Maps API key, that you can get from here ( you need a google account for this ). Select “services” from the left, and browse to google maps api v3. Activate the service and agree to the terms and conditions. Then, go to “API access” and there you will get your API key.
Now you have to add the code that will display the map on your website. Use the following example, and add your API key.
Now you have your map. You can center it by changing the latitude and longitude. Now, let’s add a marker to the center of the same map.
Add the above code inside the initialize function and you are done.
Disclosure: Some of the links in this post are "affiliate links." This means if you click on the link and purchase the item, I will receive an affiliate commission
Leave a Reply