Project

General

Profile

1
<%@page contentType="text/html"%>
2
<%
3

    
4
	/* Get the requested Web Map Context Doc
5
	 * If not specified, use the default
6
	 */
7
	 String wmc = request.getParameter("map");
8
         if (wmc == null) 
9
         {
10
		 wmc = "demisWorldMap";
11
	 }
12
         String wmcUrl = "./wmc/" + wmc + ".xml"; 
13

    
14
	 
15
	/* Get the requested Template 
16
	 * This will be the mapbuilder html body
17
	 * If not specified, use the default
18
	 */
19
	 String template = request.getParameter("template");
20
         if (template == null) 
21
         {
22
		 template = "default";
23
	 }
24
	 String templateFile = "./templates/" + template + ".html";
25
	 String configUrl = "./templates/" + template + ".xml";
26

    
27
%>	
28
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
29
<html>
30
  <head>
31
    <title>Metacat Mapbuilder Demo</title>
32
    <link rel='StyleSheet' type='text/css' href='../../lib/skin/default/docsStyle.css'>
33
    <link rel='StyleSheet' type='text/css' href='../../lib/skin/default/mapStyle.css'>
34
    <link rel='StyleSheet' type='text/css' href='../../lib/skin/default/button.css'>
35
    <link rel='StyleSheet' type='text/css' href='../../lib/skin/default/scalebar-fat.css'>
36

    
37
    <script>
38
    // URL of Mapbuilder configuration file. Required.
39
    var mbConfigUrl='<%=configUrl%>';
40
    
41
    function wmcInit() {
42
      config.loadModel('mainMap','<%=wmcUrl%>');
43
    }
44
    </script>
45
    
46
    <script type="text/javascript" src="../../lib/Mapbuilder.js"></script>
47
    <style type="text/css">
48
       body {margin:0px; padding:0px;}
49
    </style>
50
  </head>
51
  <body onload="mbDoLoad(wmcInit)">
52
  <% pageContext.include(templateFile); %>
53
  </body>
54
</html>
    (1-1/1)