Question: I have seen few examples of using geoip in node.js such as <https://github.com/kuno/GeoIP.git> and <https://github.com/wadey/node-geoip>. However what i want is to display the map showing geoip for the particular loged in user.How can it be implemented.

Answer: 
You can get a geolocation database (such as from <http://www.maxmind.com>) and store it in mongo. Each record contains an IP range (start/end) and the latitude/longitude associated with that IP range. IPs are represented as integers. You could create an index on the `start` field, and do a query on mongo to find the record with the largest value of `start` which is smaller than the IP of your client user, and look up the corresponding lat/lon.

As for plotting a map with this lat/lon, it's very easy to create a google map which is centered on a particular location: (View source at: <http://code.google.com/apis/maps/documentation/javascript/v2/examples/map-simple.html>)

There are a lot of different ways of storing/querying geolocation data, but this is just one possible approach using mongo that might work. Hope this helps.
Python Implementation:

```
#!/usr/bin/python
#coding: utf-8
import os
import pygeoip

gi = pygeoip.GeoIP('GeoIP.dat')
gic = pygeoip.GeoIP('GeoIPCity.dat')

fl = file(r'apache-unique.log')
lines = fl.readlines()

for line in lines:
    print gi.country_code_by_addr(line)
    print gic.record_by_addr(line)

os.system('pause')

```