setZoom()设置后无效
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<style type="text/css">
body,html,#container{
width:100%;
height: 100%;
margin: 0px;
}
</style>
<title>快速入门</title>
</head>
<body>
<div id="container" style="z-index:0;position:relative;">
<div style="z-index:1;position:absolute;">
<div>
<input id="search" type="text"></input>
<input id="button11" type="button" value="搜索"></input>
</div>
<div>
<input id="button21" type="button" value=""></input>
<input id="button21" type="button" value=""></input>
</div>
</div>
</div>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.4&key=3a4aa4a4337fb0956f4358c85417758a"></script>
<script type="text/javascript">
var map = new AMap.Map('container');
map.setCity('衡阳市');
map.setZoom(18);
map.setCenter([116.39,39.9]);
console.log(map.getZoom());
</script>
</body>
</html>
setZoom设置后无效,怎么回事?