portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r721872 - in /portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications: demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm gems/src/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
Date Sun, 30 Nov 2008 19:04:37 GMT
Author: taylor
Date: Sun Nov 30 11:04:37 2008
New Revision: 721872

URL: http://svn.apache.org/viewvc?rev=721872&view=rev
Log:
fixing google maps portlet, they changed the url at yahoo, and, it the impl was dependent
on a default app id that no longer exists
TODO: check in for 2.2 as well

Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
    portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/gems/src/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm?rev=721872&r1=721871&r2=721872&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
Sun Nov 30 11:04:37 2008
@@ -17,8 +17,9 @@
 <script language="JavaScript" type="text/javascript">
     function portletGoogleMapsLoadMap()
     {
-        var loc = escape("$renderRequest.getPreferences().getValue('Location','')");
-        var getLatitudeLongitudeUrl = "$renderRequest.getScheme():\/\/$renderRequest.getServerName():$renderRequest.getServerPort()$renderRequest.getContextPath()\/yahoogeocode?location="
+ loc ;
+        var loc = escape("$renderRequest.getPreferences().getValue('Location','')");
+        var appid = escape("$renderRequest.getPreferences().getValue('APIKey','')");
+        var getLatitudeLongitudeUrl = "$renderRequest.getScheme():\/\/$renderRequest.getServerName():$renderRequest.getServerPort()$renderRequest.getContextPath()\/yahoogeocode?location="
+ loc + "&appid=" + appid;
         dojo.io.bind({
 		    url: getLatitudeLongitudeUrl,
 		    mimetype: "text/xml",

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/gems/src/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/gems/src/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java?rev=721872&r1=721871&r2=721872&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/gems/src/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/applications/gems/src/java/org/apache/portals/gems/googlemaps/YahooGeocodeProxyServlet.java
Sun Nov 30 11:04:37 2008
@@ -46,16 +46,18 @@
     /**
      * Configuration 
      */
-     private static final String YAHOO_REQUEST = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&location=";
-
+     // OLD: private static final String YAHOO_REQUEST = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&location=";
+     private static final String YAHOO_REQUEST = "http://local.yahooapis.com/MapsService/V1/geocode?appid=";
//YahooDemo&location=";
     /**
      * doGet() override doGet
      */
      protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 		throws ServletException, java.io.IOException {
 		String location = req.getParameter("location");
+		String appid = req.getParameter("appid");
 		location = URLEncoder.encode(location,"UTF-8");
-		String url = YAHOO_REQUEST + location;
+		appid = URLEncoder.encode(location,"UTF-8");
+		String url = YAHOO_REQUEST + appid + "&location=" +location;
 		String content = "<error/>";
 		
 		// get content from yahoo, code from http://jakarta.apache.org/commons/httpclient/tutorial.html



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message