7***@qq.com
7***@qq.com
  • 发布:2018-08-21 13:26
  • 更新:2018-08-21 13:26
  • 阅读:1477

百度地图定位位置语义化结果

分类:HTML5+

hbuilder里如何调用getLocationDescribe()获位置的描述,位置语义化结果

map.showUserLocation(true);
map.getUserLocation(function (state, pos) {
if (0 == state) {
map.setCenter(pos);

                //.getLocationDescribe();  

                plus.maps.Map.reverseGeocode(pos, {}, function (event) {  

                    laddress = event.address; // 转换后的地理位置  
                    var point = event.coord; // 转换后的坐标信息  
                    var coordType = event.coordType; // 转换后的坐标系类型  

                ar myPoint = new BMap.Point(point.longitude,  point.latitude)  

                    if (BMapLib.GeoUtils.isPointInPolygon(myPoint, polygon1)) {  
                        console.log("ok:=" + JSON.stringify(myPoint));   
                    } else {  
                        console.log("ng:=" + JSON.stringify(myPoint));   
                    }    
                }, function (e) {  
                    alert("Error:" + JSON.stringify(e));  
                });  

            }  
        });  
2018-08-21 13:26 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复