portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r412212 - in /portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF: other/ other/googlemaps/ other/googlemaps/EditGoogleMaps.vm other/googlemaps/GoogleMaps.vm portlet.xml web.xml
Date Tue, 06 Jun 2006 20:49:32 GMT
Author: taylor
Date: Tue Jun  6 13:49:31 2006
New Revision: 412212

URL: http://svn.apache.org/viewvc?rev=412212&view=rev
Log:
start of GoogleMaps portlet 
contributed by Jonathan Phillips

Added:
    portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/
    portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/
    portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/EditGoogleMaps.vm
    portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
Modified:
    portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml
    portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/web.xml

Added: portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/EditGoogleMaps.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/EditGoogleMaps.vm?rev=412212&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/EditGoogleMaps.vm
(added)
+++ portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/EditGoogleMaps.vm
Tue Jun  6 13:49:31 2006
@@ -0,0 +1,18 @@
+<div id="EditGoogleMaps"  class="portlet-section-text"> 
+	<form name="googlemapsform" action="$renderResponse.createActionURL()" method="post"
>
+
+		Enter Location:<input type="text" name="location" value="$renderRequest.getPreferences().getValue('Location','')"
/>
+		<input type="submit" value="submit"  name="LocationSubmit" />
+	</form>
+</div>
+
+
+
+
+
+
+
+
+
+
+

Added: portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm?rev=412212&view=auto
==============================================================================
--- portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
(added)
+++ portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/other/googlemaps/GoogleMaps.vm
Tue Jun  6 13:49:31 2006
@@ -0,0 +1,36 @@
+<script language="JavaScript" type="text/javascript">
+	dojo.io.bind({
+		url: "$renderRequest.getScheme():\/\/$renderRequest.getServerName():$renderRequest.getServerPort()$renderRequest.getContextPath()\/yahoogeocode?location=$renderRequest.getPreferences().getValue('Location','')",
+		mimetype: "text/xml",
+		error: function(type, error){
+			top.alert("error");
+		},
+		load: function(type, data, event) {
+			lat = data.getElementsByTagName("Latitude").item(0).firstChild.nodeValue;
+			lng = data.getElementsByTagName("Longitude").item(0).firstChild.nodeValue;
+			//alert ("ll: " + lat + "," + lng);
+			mapit(lat,lng);
+		}
+	});
+</script>
+<script language="JavaScript" type="text/javascript">
+	function mapit(la, ln) {
+		var map = new GMap2(document.getElementById("map"));
+		// map.addControl(new GSmallMapControl());
+		// map.addControl(new GMapTypeControl());
+		map.setCenter(new GLatLng(la, ln), 13);
+	}
+</script>
+<div id="map" style="width: 500px; height: 300px"></div>
+
+
+
+
+
+
+
+
+
+
+
+

Modified: portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml?rev=412212&r1=412211&r2=412212&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml Tue Jun  6 13:49:31
2006
@@ -795,5 +795,35 @@
     </portlet-preferences>
   </portlet>
 
+  <portlet id="GoogleMapsPortlet">
+    <init-param>
+      <name>ViewPage</name>
+      <value>/WEB-INF/other/googlemaps/GoogleMaps.vm</value>
+    </init-param>
+    <init-param>
+      <name>EditPage</name>
+      <value>/WEB-INF/other/googlemaps/EditGoogleMaps.vm</value>
+    </init-param>
+    <portlet-name>GoogleMapsPortlet</portlet-name>
+    <display-name>Google Maps Portlet</display-name>
+    <portlet-class>org.apache.portals.gems.googlemaps.GoogleMapsPortlet</portlet-class>
+    <expiration-cache>-1</expiration-cache>
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>VIEW</portlet-mode>
+      <portlet-mode>EDIT</portlet-mode>
+    </supports>
+    <supported-locale>en</supported-locale>
+    <portlet-info>
+      <title>Google Map</title>
+    </portlet-info>
+    <portlet-preferences>
+      <preference>
+        <name>Location</name>
+        <value>denver, co</value>
+      </preference>
+    </portlet-preferences>
+  </portlet>         
+    
 </portlet-app>
 

Modified: portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/web.xml?rev=412212&r1=412211&r2=412212&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/web.xml (original)
+++ portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/web.xml Tue Jun  6 13:49:31
2006
@@ -60,6 +60,18 @@
     <servlet-class>org.apache.jetspeed.demo.servlet.SSOBasicDemoServlet</servlet-class>
   </servlet>       
 
+    <!-- jdp YahooGeocodeProxyServlet -->
+    <servlet>
+    <servlet-name>YahooGeocodeProxyServlet</servlet-name>
+    <servlet-class>org.apache.portals.gems.googlemaps.YahooGeocodeProxyServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+    </servlet>
+    <!-- jdp Map /yahoogecode files to YahooGeocodeProxy  -->
+    <servlet-mapping>
+    <servlet-name>YahooGeocodeProxyServlet</servlet-name>
+    <url-pattern>/yahoogeocode</url-pattern>
+    </servlet-mapping>    
+        
 	<servlet-mapping>
 		<servlet-name>SSODemo</servlet-name>
 		<url-pattern>/sso-demo</url-pattern>



---------------------------------------------------------------------
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