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.
The best module for GeoIP is <https://github.com/kuno/GeoIP> in my opinion (I actually used this module for a project and it worked perfectly for me). You have to download the database from Maxmind and also install some OS specific libraries and then compile the module.

There is no need to put the database into MongoDB unless you want to replicate easily across multiple servers. You can just put your database into a file and provide the path in the Node.js module.

Here is an example:

```
// Open the GeoLiteCity.dat file first.
var City = geoip.City;
var city = new City('/path/to/GeoLiteCity.dat');
console.log(city); // this contains country, city, lat, long, continent, postal code etc

```