Archive for the ‘development’ category

Google vs Google2

August 19th, 2009

So you are a search giant and another big company comes along and claim they are making a giant search engine (bing) and soon after they announce that they are merging with another big competitor, what do you do?

This question was put forward to Google recently and already they are back with a sandbox version of their search engine: Google 2.

Now there are no interface changes or lovely background on the search page, instead the new search page is claimed to be faster, more accurate and up to date. I think it was time Google should have done this as Bing was just starting to creep up on search market share. In their own words the Google Development team was working on this project secretly which can easily be called next generation of Google. This enhanced version promises size, indexing, speed and accuracy improvements. As said earlier there are no noticeable changes apart from speed and different results in some cases this web developer release will be a good testing ground for Google.

There is one way for you to test this under construction new version of world’s largest search engine.

We have come up with this little tool: Google vs Google2

You can compare the results from both current Google search engine and all new Google search engine side by side.

Comments and suggestions welcome like always.

Getting Started with Google Maps API for your own web app

July 6th, 2009


This short tutorial will guide you through your first implementation of Google Maps API. This is very basic tutorial and is targeted towards people who wants to use Google Maps API but are scared by the complexity of documentation available elsewhere.

You might want to use Google Maps API for the purpose of creating and displaying custom points of interests on your own website as well as doing one of many things that can be implemented by Google Maps API. I will cover different implementations later.

In simple word you will need to include the javascript API of Google Maps and then create a maps object inside a container object on your own web page.

Can I do it?

If you know a bit of javascript to change variable names where needed or if you are very very careful at copy-paste skills you can do it by following the steps below.

What do I need?

A notepad (or any web development editor) and a browser. You only need web server or a dynamic web development language (PHP / ASP) support if you are loading data from database or doing other related stuff but that is outside of the scope of this tutorial.

Sweet, Lets Start

  1. Sign-up for Google API

    Signing up for Google Maps API is free and even the usage is free. Just do it by visiting:
    When you get your API Key come back and continue through this tutorial.

  2. Include the API

    You need to include the javascript API into your webpage by including the remote js file from Google.
    Add the following line in your web page. Any place before rest of Maps code will do however try placing it in head element just after CSS files / styles.

    <script src=""
  3. Create the container object

    You need to create a container where the created maps object will show. It is a good idea to create a div / layer for the Maps that you can style and re-size yourself.
    Add the following line in your web page. Any place within the body will do. Have a play with the in-line styles or move the styles to external style sheet.

    <div id="map" style="width: 500px; height: 400px;border:1px solid #000">
  4. Create the map object

    You need to create a Google Maps object and pass the object of the target layer to the constructor.  You can place this script just after the scrip tag in step 2.
    Add the following line in your web page.

    <script type="text/javascript">
     var map = new GMap(document.getElementById("map"));

    At this point you can open up your page to witness the Google Maps object in your web page. Cool?
    Missed something? Do not worry and grab a free copy of completed page at the bottom and have fun.

  5. Set the location and zoomSetting UI Controllers

    Some basic stuff you can do with your new Google Maps is that you can set the location to any place on earth as long as you know the latitude and logitude of the location.
    Add these lines to your code just after the </div>

     map.centerAndZoom(new GPoint(70,30), 14);

    Here we are centering the maps to a geographical point (created by GPoint) with given latitude and logitude. Have fun by changing these and see where you land.
    Second value in the function is the zoom value. Google Maps can zoom from 0 (Whole world) to 17 (Street Level).
    setUIToDefault will show the usual controls on the Google Maps API (Zoom bar / Buttons to switch between map types)

  6. Just give me the cooked version

    If you know your way around in HTML and Javacript just grab the complete source code here. You are free to use it wherever you want. License: LGPL by

     <script src=""
     <div id="map" style="width: 500px; height: 400px;border:1px solid #000">
     <script type="text/javascript">
     var map = new GMap(document.getElementById("map"));
     map.centerAndZoom(new GPoint(70,30), 14);
  7. I love comments and I love debugging

    If you like or dislike this tutorial I will be happy to read your comments. If you have run into a problem just post it, as I said I love debugging and might fix your code for you.