How to include Google maps in your website

hey google maps is a cool tool you can use in your web sites and its very easy to add it but there is one problem
google has rules for free users that they cannot use it for commercial purpose's but u can use it if you are building for fun.if you realy like it and want it you can by it for commercial use
here is the first few steps to get it done
goto    http://code.google.com/apis/maps/ and there will be a link called Sign up for a Google Maps API key. 
to get this feature you should own a gmail account because you have to sign up using you gmail account
then they will give you a API key that you will use in the code to get the service
<script src="http://maps.google.com/maps?file=api&v=2&sensor=true_or_false&key=[put the API key you got here]"
    type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        map.setUIToDefault();
      }
    }
</script>
The API key is a very long key
And please read the google terms of service before you use it  http://code.google.com/apis/maps/terms.html


Comments

Popular posts from this blog

Setting up Heron Cluster with Apache Aurora Locally

Reading and Writing Binary files in java - Converting Endianness ( between Big-endian byte order and Little-endian byte order)

Writing Unit Tests to test JMS Queue listener code with ActiveMQ