Strabon

changeset 1318:3d89aafb0ad7

Strabon Endpoint: removed timemap_local view option, because it is not needed (timemap renders on localhost by default, thus the geometries were rendered twice, both from GeoXML3 and timemap)
author Babis Nikolaou <charnik@di.uoa.gr>
date Thu Apr 03 17:41:04 2014 +0300 (2014-04-03)
parents 408982a81ac1
children 76fb329cb5e9
files endpoint/WebContent/query.jsp endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java
line diff
     1.1 --- a/endpoint/WebContent/query.jsp	Mon Mar 17 20:34:37 2014 +0200
     1.2 +++ b/endpoint/WebContent/query.jsp	Thu Apr 03 17:41:04 2014 +0300
     1.3 @@ -172,10 +172,10 @@
     1.4  			var map;
     1.5  			// create map
     1.6  			<%if(request.getAttribute("handle").toString().contains("timemap")){ %>	
     1.7 -			map = tm.getNativeMap();
     1.8 -			map.setOptions(myOptions);
     1.9 +				map = tm.getNativeMap();
    1.10 +				map.setOptions(myOptions);
    1.11  			<%} else {%>
    1.12 -			var map = new google.maps.Map(document.getElementById("map"), myOptions);
    1.13 +				var map = new google.maps.Map(document.getElementById("map"), myOptions);
    1.14  			<%}%>
    1.15  			<% if (request.getAttribute("pathToKML") == null) {%>
    1.16  			//	center at Brahames
    1.17 @@ -185,7 +185,7 @@
    1.18  			addListener(map);
    1.19  
    1.20  			
    1.21 -		<%if ("map_local".equals(request.getAttribute("handle")) || ("timemap_local".equals(request.getAttribute("handle")))) {%>
    1.22 +		<%if ("map_local".equals(request.getAttribute("handle"))) {%>
    1.23  			// display using geoxml3
    1.24  			var myParser = new geoXML3.parser({map: map});
    1.25  			myParser.parse(kml);			
    1.26 @@ -195,7 +195,7 @@
    1.27  		<%}%>
    1.28  		
    1.29  		<%if (("map".equals(request.getAttribute("handle"))) || ("map_local".equals(request.getAttribute("handle")))
    1.30 -		|| ("timemap".equals(request.getAttribute("handle"))) || ("timemap_local".equals(request.getAttribute("handle")))) {%>	
    1.31 +		|| ("timemap".equals(request.getAttribute("handle")))) {%>	
    1.32  			$('html, body').animate({
    1.33  				scrollTop: $("#divResultsStart").offset().top
    1.34  			}, 1500);
    1.35 @@ -466,7 +466,6 @@
    1.36  		<OPTION value="map"<%= ("map".equals(handle)) ? "selected":""%>>On a map</OPTION>
    1.37  		<OPTION value="map_local"<%= ("map_local".equals(handle)) ? "selected":""%>>On a map (localhost)</OPTION>
    1.38  		<OPTION value="timemap"<%= ("timemap".equals(handle)) ? "selected":""%>>On a timemap</OPTION>
    1.39 -		<OPTION value="timemap_local"<%= ("timemap_local".equals(handle)) ? "selected":""%>>On a timemap (localhost)</OPTION>
    1.40  	</SELECT>
    1.41  	</td>
    1.42  </tr>
     2.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Mon Mar 17 20:34:37 2014 +0200
     2.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/QueryBean.java	Thu Apr 03 17:41:04 2014 +0300
     2.3 @@ -267,8 +267,7 @@
     2.4  				    
     2.5  				    out.flush();
     2.6  				    
     2.7 -				} else if (("map".equals(handle) || "map_local".equals(handle) ||
     2.8 -				"timemap".equals(handle) || "timemap_local".equals(handle) ) && 
     2.9 +				} else if (("map".equals(handle) || "map_local".equals(handle) || "timemap".equals(handle)) && 
    2.10  						(queryResultFormat == stSPARQLQueryResultFormat.KML || 
    2.11  						 queryResultFormat == stSPARQLQueryResultFormat.KMZ) ) {
    2.12  					// show map (only valid for KML/KMZ)