« 返回到 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 附件
49537 查看
平均 (2 票)
满分为 5,平均得分为 4.0。
评论
讨论主题回复 作者 日期
After these instructions, there is blank, grey... Jakub Liska 2010年10月6日 上午9:18
Once you've installed IP Geocoder, edit... Franck Liénard 2011年2月13日 上午9:06
Yes you are correct Franck. I had the same... Manikandan S 2011年8月15日 下午9:55
Hi Franck, In my... Manikandan S 2011年8月17日 上午3:01

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
在 10-10-6 上午9:18 发帖。
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>
在 11-2-13 上午9:06 发帖以回复 Jakub Liska
Yes you are correct Franck. I had the same problem then I replaced this coding now its working fine. Thanks.
在 11-8-15 下午9:55 发帖以回复 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.
在 11-8-17 上午3:01 发帖以回复 Mani kandan