买了网站主机后如何建设网站,wordpress 分类目录 设置 前缀 后 出现404,妖精直播,ui培训的课程1.问题描述
在App中供用户在地图上选择地址#xff0c;目前在使用Map Kit结合geolocationManager逆地理编码时获取的地址信息描述不准确#xff0c;希望能提供相应的Demo参考。
解决方案
Demo代码示例#xff1a;
getLocation() {
let requestInfo: geoLocationManager.…1.问题描述
在App中供用户在地图上选择地址目前在使用Map Kit结合geolocationManager逆地理编码时获取的地址信息描述不准确希望能提供相应的Demo参考。
解决方案
Demo代码示例
getLocation() {
let requestInfo: geoLocationManager.LocationRequest {
priority: geoLocationManager.LocationRequestPriority.FIRST_FIX,
scenario: geoLocationManager.LocationRequestScenario.UNSET,
};
try {
// 获取当前位置
geoLocationManager.getCurrentLocation(requestInfo).then((data) {
this.lat data.latitude;
this.lon data.longitude;
let info: geoLocationManager.ReverseGeoCodeRequest {
// 获取当前位置的纬度
latitude: data.latitude,
// 获取当前位置的经度
longitude: data.longitude,
// 获取次数大于10次以便获得cityCode
maxItems: 10
}
// 使用逆地理编码
geoLocationManager.getAddressesFromLocation(info).then((code) {
this.message JSON.stringify(code);
console.log(here is resgeo code : JSON.stringify(code))
})
});
} catch (exception) {
console.log(zzzzz exception)
}
}从以上的示例代码分析调用的是Map kit的getCameraPosition接口而geolocationManager是Location Kit的逆地理编码接口。华为地图使用的坐标类型在国内站点中国大陆、中国香港和中国澳门使用GCJ02坐标系location定位功能默认使用WGS84类型坐标系不一样所以会有偏差建议保持统一直接调用地图的逆地理接口site.reverseGeocode。
2.问题描述
升级后系统版本2.0.0.59(SP3DEVC00E59R6P1log)操作系统 HarmonyOS NEXT Developer Preview 1发现地图不显示了。在AppGallery Connect中开通了地图服务并将Client ID配置到module.json5文件中为什么还是无法显示地图
解决方案
请从以下几点排查原因 开通相关服务存在一定的延迟一般有10分钟左右。 module.json5文件中metadata节点下clientid是否正确请在里面直接写入client_id不能通过$符引用资源文件中的值当前无法解析这种引用方式。 签名证书配置方式 “选择SHA256公钥指纹‘’请参考https://developer.huawei.com/consumer/cn/doc/app/agc-help-signature-info-0000001628566748#section5181019153511。
3.问题描述
使用Developer Preview1 Map Kit的地图呈现和位置搜索功能出现以下问题 地图呈现没有出现地图内容。 位置搜索功能返回 err {“code”:1002600004,“name”:“The Map permission is not enabled.”,“message”:“The Map permission is not enabled.”} HarmonyOS Next Developer Preview(2.0.0.33)安装 Preview1 SDK的应用报错需要升级手机系统 模拟器能不能使用地图 IDE中自动生成的debug签名能不能使用地图相关功能
解决方案
1/2/5. 使用Map Kit功能既需打开配置服务开关还需配置应用签名证书指纹具体配置方法请参考https://developer.huawei.com/consumer/cn/doc/app/agc-help-signature-info-0000001628566748#section5181019153511。 Map Kit能力从Preview1开始支持设备(2.0.0.33)版本是旧版本不配套请升级。 模拟器暂时是不支持地图的。