日期:2014-05-16 浏览次数:20444 次
//判断是否有此功能
<%!public boolean check(String function, String[] functions) {
??if (functions == null || functions.length == 0) {
???return true;
??}
??for (int i = 0; i < functions.length; i++) {
???if (function.equals(functions[i])) {
????return true;
???}
??}
??return false;
?}%>
<%
request.setCharacterEncoding("utf-8");
%>
//定义可用的功能
<%
?String[] functions = new String[] { "overview", "navigator", "layerControl", "spatialQuery", "sqlQuery", "bufferQuery", "findPath", "findNearest",
?"edit", "closestFacility", "overlayAnalyst", "dynamicTheme", "statistic", "switchMap"};
%>
//判断是否可用
<%
?? if (check("overview", functions)) {
%>
????? zhongguo
<%}%>