Strabon

changeset 699:00a9bf5d8b50

Now center at brahames is used only when no geometry is selected.
author Stella Giannakopoulou <sgian@di.uoa.gr>
date Thu Nov 08 16:09:49 2012 +0200 (2012-11-08)
parents 9a4bb8e81273
children ef738d9a466a
files endpoint/WebContent/query.jsp
line diff
     1.1 --- a/endpoint/WebContent/query.jsp	Tue Nov 06 19:24:43 2012 +0200
     1.2 +++ b/endpoint/WebContent/query.jsp	Thu Nov 08 16:09:49 2012 +0200
     1.3 @@ -117,21 +117,23 @@
     1.4  	<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
     1.5  	<script type="text/javascript">
     1.6  		function initialize() {
     1.7 -			// center at Brahames
     1.8 -			var brahames = new google.maps.LatLng(37.92253, 23.72275);
     1.9  			var myOptions = {
    1.10  				zoom: 11,
    1.11 -				center: brahames,
    1.12  				mapTypeId: google.maps.MapTypeId.ROADMAP
    1.13  			};
    1.14  			
    1.15  			// get KML filename
    1.16  			var kml = '<%=request.getAttribute("pathToKML")%>';
    1.17 +			
    1.18  			// create map
    1.19  			var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    1.20 -		
    1.21 +			<% if (request.getAttribute("pathToKML") == null) {%>
    1.22 +				// center at Brahames
    1.23 +				map.setCenter(new google.maps.LatLng(37.92253, 23.72275));
    1.24 +			<%}%>
    1.25 +			
    1.26 +		<%if ("map_local".equals(request.getAttribute("handle"))) {%>
    1.27  			// display using geoxml3
    1.28 -		<%if ("map_local".equals(request.getAttribute("handle"))) {%>
    1.29  			var myParser = new geoXML3.parser({map: map});
    1.30  			myParser.parse(kml);
    1.31