直接甩代码好了,谷歌地图开发,有注释
<body>
<div class="map">
<div id="map_canvas"></div>
</div>
</body>
js代码
<script type="text/javascript">
//根据登录用户的权限创建中心点
var url;
var map;
var lat,lng,def_zoom,icon;
var localMapType = new LocalMapType(config.url,config.maxZoon,config.minZoon);
var localSaMap = new LocalSaMapType(config.url,config.maxZoon,config.minZoon);
url=CTX_PATH + "lgyj/map/central/centralQuery.do";
$.ajax({
url:url,
async:false,
success:function(data){
if(data != undefined && data!=null && data!=""){
lat = data.lat;
lng = data.lng;
def_zoom = data.zoom;
if(data.icon!="" && data.icon!=null)
def_icon =icon_url+