From 19cfd37456d6bf42fcb90207b481637f56aedb6d Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Sat, 23 Jun 2018 11:26:55 +0800 Subject: [PATCH] screencontroller rtm-layout utf-8 更新 --- src/main/webapp/js/moralmap.js | 22 +++++++++++++++------- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/js/moralmap.js b/src/main/webapp/js/moralmap.js index c2b46ce..975ed08 100644 --- a/src/main/webapp/js/moralmap.js +++ b/src/main/webapp/js/moralmap.js @@ -54,12 +54,21 @@ style: "normal" //������������������������������ } map.setMapStyle(mapStyle); - var showZoom = 13; - if(arguments.length == 2) { - map.centerAndZoom(new BMap.Point(arguments[0], arguments[1]), showZoom); - } else if(arguments.length == 1) { - map.centerAndZoom(arguments[0], showZoom); - } + var showZoom = 12; + var address = arguments[0]; + var regoinNames = address.split(" "); + var cityName = regoinNames.length>1?regoinNames[1]:regoinNames[0]; + map.setCurrentCity(cityName); + // ���������������������������������������,��������������������� + // ��������������������������� + var myGeo = new BMap.Geocoder(); + myGeo.getPoint(address, function(point){ + if (point) { + map.centerAndZoom(point, showZoom); + }else{ + alert("������������������������������������!"); + } + }, cityName); //������������������ map.enableScrollWheelZoom(true); var navigation = new BMap.NavigationControl({ @@ -182,7 +191,6 @@ isOver = true; moralMap.setMaxBounds(bs); } else { - debugger; isOver = (bs.northeastLng > _bounds.northeastLng || bs.northeastLat > _bounds.northeastLat || bs.southwestLng < _bounds.southwestLng -- Gitblit v1.8.0