Index: lams_tool_gmap/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/build.xml,v diff -u -r1.2 -r1.3 --- lams_tool_gmap/build.xml 30 May 2008 03:42:58 -0000 1.2 +++ lams_tool_gmap/build.xml 3 Jun 2008 03:53:16 -0000 1.3 @@ -206,6 +206,25 @@ + + + + + + + + + + + + + + + + + + + Index: lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/dto/GmapDTO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/dto/GmapDTO.java,v diff -u -r1.2 -r1.3 --- lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/dto/GmapDTO.java 2 Jun 2008 07:51:10 -0000 1.2 +++ lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/dto/GmapDTO.java 3 Jun 2008 03:53:17 -0000 1.3 @@ -32,6 +32,7 @@ import org.apache.log4j.Logger; import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; import org.lamsfoundation.lams.tool.gmap.model.Gmap; +import org.lamsfoundation.lams.tool.gmap.model.GmapMarker; import org.lamsfoundation.lams.tool.gmap.model.GmapAttachment; import org.lamsfoundation.lams.tool.gmap.model.GmapSession; @@ -55,6 +56,33 @@ //public boolean allowRichEditor; + + public boolean allowEditMarkers; + + public boolean allowShowAllMarkers; + + public boolean limitMarkers; + + public int maxMarkers; + + public boolean allowZoom; + + public boolean allowTerrain; + + public boolean allowSatellite; + + public boolean allowHybrid; + + public Double mapCenterLatitude; + + public Double mapCenterLongitude; + + public int mapZoom; + + public String mapType; + + public Set gmapMarkers; + public Set onlineInstructionsFiles; public Set offlineInstructionsFiles; @@ -71,7 +99,20 @@ onlineInstructions = gmap.getOnlineInstructions(); offlineInstructions = gmap.getOfflineInstructions(); contentInUse = gmap.isContentInUse(); - //allowRichEditor = gmap.isAllowRichEditor(); + //allowRichEditor = gmap.isAllowRichEditor(); + allowEditMarkers = gmap.isAllowEditMarkers(); + allowShowAllMarkers = gmap.isAllowShowAllMarkers(); + limitMarkers = gmap.isLimitMarkers(); + maxMarkers = gmap.getMaxMarkers(); + allowZoom = gmap.isAllowZoom(); + allowTerrain = gmap.isAllowTerrain(); + allowSatellite = gmap.isAllowSatellite(); + allowHybrid = gmap.isAllowHybrid(); + mapCenterLatitude = gmap.getMapCenterLatitude(); + mapCenterLongitude = gmap.getMapCenterLongitude(); + mapZoom = gmap.getMapZoom(); + mapType = gmap.getMapType(); + gmapMarkers = gmap.getGmapMarkers(); onlineInstructionsFiles = new TreeSet(); offlineInstructionsFiles = new TreeSet(); @@ -175,11 +216,117 @@ this.contentInUse = contentInUse; } + public boolean isAllowEditMarkers() { + return allowEditMarkers; + } + + public void setAllowEditMarkers(boolean allowEditMarkers) { + this.allowEditMarkers = allowEditMarkers; + } + + public boolean isAllowShowAllMarkers() { + return allowShowAllMarkers; + } + + public void setAllowShowAllMarkers(boolean allowShowAllMarkers) { + this.allowShowAllMarkers = allowShowAllMarkers; + } + + public boolean isLimitMarkers() { + return limitMarkers; + } + + public void setLimitMarkers(boolean limitMarkers) { + this.limitMarkers = limitMarkers; + } + + public int getMaxMarkers() { + return maxMarkers; + } + + public void setMaxMarkers(int maxMarkers) { + this.maxMarkers = maxMarkers; + } + + public boolean isAllowZoom() { + return allowZoom; + } + + public void setAllowZoom(boolean allowZoom) { + this.allowZoom = allowZoom; + } + + public boolean isAllowTerrain() { + return allowTerrain; + } + + public void setAllowTerrain(boolean allowTerrain) { + this.allowTerrain = allowTerrain; + } + + public boolean isAllowSatellite() { + return allowSatellite; + } + + public void setAllowSatellite(boolean allowSatellite) { + this.allowSatellite = allowSatellite; + } + + public boolean isAllowHybrid() { + return allowHybrid; + } + + public void setAllowHybrid(boolean allowHybrid) { + this.allowHybrid = allowHybrid; + } + + public Double getMapCenterLatitude() { + return mapCenterLatitude; + } + + public void setMapCenterLatitude(Double mapCenterLatitude) { + this.mapCenterLatitude = mapCenterLatitude; + } + + public Double getMapCenterLongitude() { + return mapCenterLongitude; + } + + public void setMapCenterLongitude(Double mapCenterLongitude) { + this.mapCenterLongitude = mapCenterLongitude; + } + + public int getMapZoom() { + return mapZoom; + } + + public void setMapZoom(int mapZoom) { + this.mapZoom = mapZoom; + } + + public String getMapType() { + return mapType; + } + + public void setMapType(String mapType) { + this.mapType = mapType; + } + + public Set getGmapMarkers() { + return gmapMarkers; + } + + public void setGmapMarkers(Set gmapMarkers) { + this.gmapMarkers = gmapMarkers; + } + //public boolean isAllowRichEditor() { // return allowRichEditor; //} //public void setAllowRichEditor(boolean allowRichEditor) { // this.allowRichEditor = allowRichEditor; //} + + } Index: lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/model/Gmap.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/model/Gmap.java,v diff -u -r1.3 -r1.4 --- lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/model/Gmap.java 2 Jun 2008 07:51:10 -0000 1.3 +++ lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/model/Gmap.java 3 Jun 2008 03:53:20 -0000 1.4 @@ -396,8 +396,6 @@ toContent = (Gmap) fromContent.clone(); toContent.setToolContentId(toContentId); toContent.setCreateDate(new Date()); - Set set = new HashSet(); - toContent.setGmapMarkers(set); return toContent; } @@ -408,32 +406,36 @@ gmap = (Gmap) super.clone(); gmap.setUid(null); + Set attachmentSet = new HashSet(); + Set markerSet = new HashSet(); + + if (gmapAttachments != null) { // create a copy of the attachments Iterator iter = gmapAttachments.iterator(); - Set set = new HashSet(); while (iter.hasNext()) { GmapAttachment originalFile = (GmapAttachment) iter.next(); GmapAttachment newFile = (GmapAttachment) originalFile.clone(); - set.add(newFile); + attachmentSet.add(newFile); } - gmap.gmapAttachments = set; } + gmap.gmapAttachments = attachmentSet; if (gmapMarkers != null) { // create a copy of the attachments Iterator iter = gmapMarkers.iterator(); - Set set = new HashSet(); while (iter.hasNext()) { GmapMarker originalMarker = (GmapMarker) iter.next(); GmapMarker newMarker = (GmapMarker) originalMarker.clone(); - set.add(newMarker); + markerSet.add(newMarker); } - gmap.gmapAttachments = set; + } + gmap.gmapMarkers = markerSet; + // create an empty set for the gmapSession - gmap.gmapSessions = new HashSet(); - + gmap.gmapSessions = new HashSet(); + } catch (CloneNotSupportedException cnse) { log.error("Error cloning " + Gmap.class); } Index: lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/actions/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/actions/LearningAction.java,v diff -u -r1.2 -r1.3 --- lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/actions/LearningAction.java 2 Jun 2008 07:51:10 -0000 1.2 +++ lams_tool_gmap/src/java/org/lamsfoundation/lams/tool/gmap/web/actions/LearningAction.java 3 Jun 2008 03:53:21 -0000 1.3 @@ -112,11 +112,13 @@ request.setAttribute("mode", mode.toString()); learningForm.setToolSessionID(toolSessionID); - GmapDTO gmapDTO = new GmapDTO(); - gmapDTO.title = gmap.getTitle(); - gmapDTO.instructions = gmap.getInstructions(); + //GmapDTO gmapDTO = new GmapDTO(); + //gmapDTO.title = gmap.getTitle(); + //gmapDTO.instructions = gmap.getInstructions(); //gmapDTO.allowRichEditor = gmap.isAllowRichEditor(); + GmapDTO gmapDTO = new GmapDTO(gmap); + request.setAttribute("gmapDTO", gmapDTO); // Set the content in use flag. Index: lams_tool_gmap/web/common/learnerheader.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/common/learnerheader.jsp,v diff -u -r1.1 -r1.2 --- lams_tool_gmap/web/common/learnerheader.jsp 23 May 2008 06:29:10 -0000 1.1 +++ lams_tool_gmap/web/common/learnerheader.jsp 3 Jun 2008 03:53:17 -0000 1.2 @@ -19,4 +19,63 @@ + + + + + + + + + Index: lams_tool_gmap/web/includes/javascript/authoring.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/includes/javascript/authoring.js,v diff -u -r1.4 -r1.5 --- lams_tool_gmap/web/includes/javascript/authoring.js 2 Jun 2008 07:51:10 -0000 1.4 +++ lams_tool_gmap/web/includes/javascript/authoring.js 3 Jun 2008 03:53:17 -0000 1.5 @@ -3,7 +3,6 @@ var map; var markers; var geocoder = null; -var markerManager = null; function init() { // open the current tab var tag = document.getElementById("currentTab"); @@ -33,8 +32,6 @@ */ markers = new Array(); geocoder = new GClientGeocoder(); - var mgrOptions = { trackMarkers: true }; - //markerManager = new GMarkerManager(map, mgrOptions); } } Index: lams_tool_gmap/web/includes/javascript/mapFunctions.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/includes/javascript/Attic/mapFunctions.js,v diff -u -r1.4 -r1.5 --- lams_tool_gmap/web/includes/javascript/mapFunctions.js 2 Jun 2008 07:51:10 -0000 1.4 +++ lams_tool_gmap/web/includes/javascript/mapFunctions.js 3 Jun 2008 03:53:16 -0000 1.5 @@ -206,22 +206,6 @@ } -/* -function saveClick(x) -{ - var title=document.getElementById("markerTitle"); - if (title==null || trim(title) == "") - { - alert("Title is required."); - return false; - } - else - { - saveMarkerInfo(x); - } -} -*/ - function saveMarkerInfo(x) { if (markers[x] != null) @@ -332,32 +316,23 @@ } } xmlString += "" - document.authoringForm.markersXML.value=xmlString; + //document.authoringForm.markersXML.value=xmlString; + document.getElementById("markersXML").value=xmlString; } // TODO: This method should only be included for the authoring pages, put them in another file function saveMapState() { - document.authoringForm.mapZoom.value=map.getZoom(); - document.authoringForm.mapCenterLatitude.value=map.getCenter().lat(); - document.authoringForm.mapCenterLongitude.value=map.getCenter().lng(); - + document.getElementById("mapZoom").value=map.getZoom(); + document.getElementById("mapCenterLatitude").value=map.getCenter().lat(); + document.getElementById("mapCenterLongitude").value=map.getCenter().lng(); var mapTypeName = map.getCurrentMapType().getName(); - - alert("TYPE: " +mapTypeName); - var mapType = ""; - if (mapTypeName == "Satellite") { mapType = "G_SATELLITE_MAP"; } - else if (mapTypeName == "Hybrid") { mapType = "G_HYBRID_MAP"; } - else if (mapTypeName == "Terrain") { mapType = "G_PHYSICAL_MAP"; } - else { mapType = "G_NORMAL_MAP"; } - - document.authoringForm.mapType.value=mapType; - - alert(document.authoringForm.mapZoom.value); - alert(document.authoringForm.mapCenterLatitude.value); - alert(document.authoringForm.mapCenterLongitude.value); - alert(document.authoringForm.mapType.value); + if (mapTypeName == "Satellite"){ mapType = "G_SATELLITE_MAP"; } + else if (mapTypeName == "Hybrid") { mapType = "G_HYBRID_MAP"; } + else if (mapTypeName == "Terrain") { mapType = "G_PHYSICAL_MAP"; } + else { mapType = "G_NORMAL_MAP"; } + document.getElementById("mapType").value=mapType; } Index: lams_tool_gmap/web/layouts/learningLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/layouts/learningLayout.jsp,v diff -u -r1.1 -r1.2 --- lams_tool_gmap/web/layouts/learningLayout.jsp 23 May 2008 06:29:11 -0000 1.1 +++ lams_tool_gmap/web/layouts/learningLayout.jsp 3 Jun 2008 03:53:20 -0000 1.2 @@ -5,7 +5,7 @@ - + Index: lams_tool_gmap/web/pages/authoring/advanced.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/pages/authoring/advanced.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_gmap/web/pages/authoring/advanced.jsp 2 Jun 2008 07:51:10 -0000 1.2 +++ lams_tool_gmap/web/pages/authoring/advanced.jsp 3 Jun 2008 03:53:16 -0000 1.3 @@ -2,6 +2,7 @@ +

@@ -60,6 +61,16 @@

+ +

Index: lams_tool_gmap/web/pages/authoring/authoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/pages/authoring/authoring.jsp,v diff -u -r1.3 -r1.4 --- lams_tool_gmap/web/pages/authoring/authoring.jsp 2 Jun 2008 07:51:10 -0000 1.3 +++ lams_tool_gmap/web/pages/authoring/authoring.jsp 3 Jun 2008 03:53:16 -0000 1.4 @@ -36,11 +36,11 @@ - - - - - + + + + +

Index: lams_tool_gmap/web/pages/authoring/basic.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/pages/authoring/basic.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_gmap/web/pages/authoring/basic.jsp 2 Jun 2008 07:51:10 -0000 1.4 +++ lams_tool_gmap/web/pages/authoring/basic.jsp 3 Jun 2008 03:53:16 -0000 1.5 @@ -43,51 +43,42 @@ - - -
" /> - - - - - - - - - + + + + + + + + Index: lams_tool_gmap/web/pages/authoring/headItems.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_gmap/web/pages/authoring/headItems.jsp,v diff -u -r1.4 -r1.5 --- lams_tool_gmap/web/pages/authoring/headItems.jsp 2 Jun 2008 07:51:10 -0000 1.4 +++ lams_tool_gmap/web/pages/authoring/headItems.jsp 3 Jun 2008 03:53:16 -0000 1.5 @@ -6,11 +6,13 @@ + + - - + + + +