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.
I've just published an NPM module for the [IPLocate.io API](https://www.iplocate.io) which I created, which lets you find the location (city, country and coordinates) based on an IP address.

Super easy, no databases to download, and 1,500 free requests per day.

Install
-------

`npm install node-iplocate`

Usage
-----

```
const iplocate = require("node-iplocate");

iplocate("8.8.8.8").then(function(results) {
  console.log("IP Address: " + results.ip);
  // IP Address: 8.8.8.8
  console.log("Country: " + results.country + " (" + results.country_code + ")"); 
  // Country: United States (US)
  console.log("Continent: " + results.continent); 
  // Continent: North America
  console.log("Organisation: " + results.org + " (" + results.asn + ")"); 
  // Organisation: Google LLC (AS15169)

  console.log(JSON.stringify(results, null, 2));
  /*
    {
      "ip": "8.8.8.8",
      "country": "United States",
      "country_code": "US",
      "city": null,
      "continent": "North America",
      "latitude": 37.751,
      "longitude": -97.822,
      "time_zone": null,
      "postal_code": null,
      "org": "Google LLC",
      "asn": "AS15169"
    }
  */
});

// Or with callbacks
iplocate("8.8.8.8", null, function(err, results) {
  // ...
  console.log(JSON.stringify(results, null, 2));
});

// Provide an API key from IPLocate.io
iplocate("8.8.8.8", { api_key: "abcdef" }).then(function(results) {
  // ...
});

```