map.jsp
来自「Java的框架」· JSP 代码 · 共 95 行
JSP
95 行
<%@ include file="/common/taglibs.jsp"%>
<mcaps:userPreference key="map" name="map" scope="page"/>
<html>
<head>
<title><fmt:message key="mapDetail.title"/></title>
<content tag="heading">
<fmt:message key="mapDetail.heading"/>
</content>
<c:if test="${map == 'mb'}">
<script LANGUAGE="JavaScript">
//Function called after the mapbuilder scripts have loaded completely
//to pan to the road using the road bbox
function onMbDoLoadComplete() {
}
function changeMapTemplate(ctl){
window.document.location="<c:url value="/mapbuilder.action" />?mapName=<c:out value="${param.mapName}" />&mapTemplate=" + ctl.value;
}
</script>
<script type="text/javascript" src="<c:url value='/scripts/selectbox.js'/>"></script>
<c:if test="${!empty mapConfig}">
<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/map.css'/>" />
<script>
// URL of Mapbuilder default configuration file.
<c:choose>
<c:when test="${!empty mbConfigUrl}">
<c:set var="customParamStr" value="" />
<c:if test="${!empty customParams}" >
<c:set var="customParamStr" value="&customParams=${fn:replace(customParams,'&','&')}" />
</c:if>
var mbConfigUrl='<c:url value="${mbConfigUrl}" /><c:out value="${customParamStr}" escapeXml="false"/>';
</c:when>
<c:otherwise>
<c:set var="customParamStr" value="" />
<c:if test="${!empty customParams}" >
<c:set var="customParamStr" value="&customParams=${fn:replace(customParams,'&','&')}" />
</c:if>
var mbConfigUrl='<c:url value="${mapConfig.configDir}${mapConfig.configFile}" />?mapLib=<c:out value="${mapConfig.mapLib}" />&mainContextFile=<c:out value="${mapDetail.contextFile}" />&locatorContextFile=<c:out value="${mapDetail.locatorContextFile}" /><c:out value="${customParamStr}" escapeXml="false"/>';
</c:otherwise>
</c:choose>
</script>
<script type="text/javascript" src="<c:out value="${mapConfig.mapLib}" />/Mapbuilder.js"></script>
</c:if>
</c:if>
</head>
<body>
<c:choose>
<c:when test="${map == 'mb'}">
<div class="separator"></div>
<table width="100%">
<tr>
<td width="80%">
<fmt:message key="mapView.switchMap"/> :
<select id="mapTemplate" name="mapTemplate"
onchange="javascript:changeMapTemplate(this);">
<c:forEach var='item' items='${mapConfig.configMap}'>
<option name="<c:out value="${item.key}"/>" value="<c:out value="${item.key}"/>"
<c:if test="${param.mapTemplate==item.key}">selected</c:if> ><c:out value="${item.key}"/>
</option>
</c:forEach>
</select>
</td>
<td width="20%" align="left">
<button name="cancel" type="button" style="margin-right: 5px"
onclick="window.location='<c:url value="/mapDetails.action" />'">
<fmt:message key="button.cancel"/>
</button>
</td>
</tr>
</table>
<div class="separator"></div>
<h3><c:out value="${param.mapName}" /></h3>
<!-- jsp:include page="/WEB-INF/pages/core/map/mapView.jsp?mapName=<c:out value='${param.mapName}'/>"/ -->
<c:choose>
<c:when test="${empty param.mapTemplate}">
<c:import url="/map/view/mb/defaultMapView.jsp?mapName=${param.mapName}&mapTemplate=default"/>
</c:when>
<c:otherwise>
<c:import url="/map/view/mb/${param.mapTemplate}MapView.jsp?mapName=${param.mapName}&mapTemplate=${param.mapTemplate}"/>
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
Sorry this page only supports MapBuilder Map.
</c:otherwise>
</c:choose>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?