毕业论文开发语言企业开发JAVA技术.NET技术WEB开发Linux/Unix数据库技术Windows平台移动平台嵌入式论文范文英语论文
您现在的位置: 毕业论文 >> net技术 >> 正文

google地图API服务器拒绝了您的请求。请求中指定的‘sensor'参数必须设置为‘true'或'fase'

更新时间:2012-11-8:  来源:毕业论文

google地图API服务器拒绝了您的请求。请求中指定的‘sensor'参数必须设置为‘true'或'fase'
这是什么情况,我该怎么解决 .在本地调试行,但是运行在服务器上就提示上面那个。

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>       <script type="text/javascript">         var directionDisplay;         var directionsService = new google.maps.DirectionsService();         var map;         var geocoder;           function initialize() {             directionsDisplay = new google.maps.DirectionsRenderer();             geocoder = new google.maps.Geocoder();               var chicago = new google.maps.LatLng(41.850033, -87.6500523);             var myOptions = {                 zoom: 7,                 mapTypeId: google.maps.MapTypeId.ROADMAP,                 disableDefaultUI: true,                 center: chicago             }             map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);             directionsDisplay.setMap(map);             directionsDisplay.setPanel(document.getElementById("directionsPanel"));                         var tmpArr, QueryString;             var URL = document.location.toString();             if (URL.lastIndexOf("?") != -1) {                 QueryString = URL.substring(URL.lastIndexOf("?") + 1, URL.length);                 QueryString = QueryString.substring(QueryString.lastIndexOf("=") + 1, QueryString.length);                 tmpArr = QueryString.split("&");                 for (i = 0; i < tmpArr.length; i++) {                     try {                         var ID = eval(tmpArr[i]);                     }                     catch (e) {                         var re = new RegExp("(.*)=(.*)", "ig");                         re.exec(tmpArr[i]);                         try { eval(RegExp.$1 + "=" + "\"" + RegExp.$2 + "\""); }                         catch (e) { }                     }                 }             }             else {                 QueryString = "";             }             if (QueryString.length > 0) {                 document.getElementById("addressIfnfo").value = QueryString;                 $(document).ready(function() {                     codeAddress();                 });             }         }           function calcRoute() {             var start = document.getElementById("fromAddress").value;             var end = document.getElementById("toAddress").value;             var request = {                 origin: start,                 destination: end,                 travelMode: google.maps.DirectionsTravelMode.DRIVING             };             directionsService.route(request, function(response, status) {                 if (status == google.maps.DirectionsStatus.OK) {                     directionsDisplay.setDirections(response);                 }             });         }         function codeAddress() {             var address = document.getElementById("addressIfnfo").value;             if (geocoder) {                 geocoder.geocode({ 'address': address }, function(results, status) {                     if (status == google.maps.GeocoderStatus.OK) {                         map.setCenter(results[0].geometry.location);                         var marker = new google.maps.Marker({                             map: map,                             position: results[0].geometry.location                         });                     }                 });             }         }       </script>

一个密钥对应一台机器。。。换机器了之后要重新申请。。

设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优尔论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。