Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why
« Back to Portlets

IP Geocoder Portlet

Table of Contents [-]

Information #

The IP Geocoder portlet locates your geological position. This portlet is not used so much as a stand alone portlet, although it does display your location in the portlet window, but is used in conjunction with other portlets, such as the Map portlet and the Google Maps portlet. The IP Geocoder portlet utilizes Max Mind's GeoIP City Database.

Configure#

  • 1. Deploy the IP Geocoder portlet.
  • 2. Shut down your application server.
  • 3. Download the GeoIP City Database, such as the free GeoLite City Database.
  • 4. Unzip the .dat file to your desired storage path.
  • 5. Go to /{ROOT}/webapps/ip-geocoder-portlet/WEB-INF/classes/.
  • 6. Create a portlet-ext.properties file at this location.
  • 7. Add the property maxmind.database.file=(GeoIP City Database .dat file path) to this file.
  • 8. Start your application server.
0 Attachments
40150 Views
Average (2 Votes)
The average rating is 4.0 stars out of 5.
Comments
Threaded Replies Author Date
After these instructions, there is blank, grey... Jakub Liska October 6, 2010 9:18 AM
Once you've installed IP Geocoder, edit... Franck Liénard February 13, 2011 9:06 AM
Yes you are correct Franck. I had the same... Manikandan S August 15, 2011 9:55 PM
Hi Franck, In my... Manikandan S August 17, 2011 3:01 AM

After these instructions, there is blank, grey screen inside the portlet and I can't manage all the other porlets within the page (remove, min, max, edit)...
because of this:

16:06:18,191 INFO [PortalImpl:3847] Current URL /poller/receive generates exception: null
16:06:48,193 INFO [PortalImpl:3847] Current URL /poller/send generates exception: null
16:07:18,195 INFO [PortalImpl:3847] Current URL /poller/send generates exception: null
16:07:34,706 INFO [PortalImpl:3847] Current URL /poller/receive generates exception: null
16:07:39,969 INFO [PortalImpl:3847] Current URL /poller/receive generates exception: null
16:08:09,969 INFO [PortalImpl:3847] Current URL /poller/send generates exception: null
16:08:39,971 INFO [PortalImpl:3847] Current URL /poller/send generates exception: null
16:08:42,645 INFO [PortalImpl:3847] Current URL /poller/receive generates exception: null
16:09:04,135 INFO [PortalImpl:3847] Current URL /poller/receive generates exception: null
16:09:14,498 INFO [PortalImpl:3847] Current URL /poller/receive generates exception: null
Posted on 10/6/10 9:18 AM.
Once you've installed IP Geocoder, edit /social-networking-portlet/map/view.jsp.
Replace these lines :
<liferay-util:html-bottom>
<script src="http://www.google.com/jsapi?key=<%= PortletProps.get("map.google.maps.api.key") %>" type="text/javascript"></script>
</liferay-util:html-bottom>

By :
<liferay-util:html-top>
<script src="http://www.google.com/jsapi?key=your-google-maps-api-key" type="text/javascript"></script>
</liferay-util:html-top>
Posted on 2/13/11 9:06 AM in reply to Jakub Liska.
Yes you are correct Franck. I had the same problem then I replaced this coding now its working fine. Thanks.
Posted on 8/15/11 9:55 PM in reply to Franck Liénard.
Hi Franck,
In my social-networking-portlet\map\view.jsp page shows like,
float latitude = ipInfo.getLatitude();
System.out.println("latitude#########"+latitude);
float longitude = ipInfo.getLongitude();
System.out.println(" longitude #########"+longitude);
Both latitude and longitude return 0.0 value. I couldn't get exact location of the user in the map.
Posted on 8/17/11 3:01 AM in reply to Mani kandan.