首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏Java实战博客

    MongoDB 整合GEO

    所以需要我们使用vo收发数据 public static final UserLocationVo format(UserLocation userLocation) { UserLocationVo userLocationVo.setCreate_time(userLocation.getCreate_time()); userLocationVo.setId(userLocation.getId (userLocation.getUpdate_time()); userLocationVo.setUserId(userLocation.getUserId()); userLocationVo.setLongitude(userLocation.getLocation().getX()); userLocationVo.setLatitude(userLocation.getLocation > userLocations) { List<UserLocationVo> list = new ArrayList<>(); for (UserLocation userLocation

    83520编辑于 2022-01-19
  • 来自专栏各类技术文章~

    构件flutter定位服务

    var location = Location(); ​ Future<UserLocation> getLocation() async { try { var userLocation = await location.getLocation(); _currentLocation = UserLocation( latitude: userLocation.latitude StreamController<UserLocation> _locationController = StreamController<UserLocation>(); ​ Stream ${userLocation?. latitude}, Long: ${userLocation?.longitude}'), ); } }

    1.8K00发布于 2021-10-05
  • 来自专栏hrscy

    iOS百度地图问题总结(三)

    BMKUserTrackingModeFollow;//设置定位的状态 _mapView.showsUserLocation = YES;//显示定位图层 } /** *用户位置更新后,会调用此函数 *@param userLocation 新的用户位置 */ - (void)didUpdateBMKUserLocation:(BMKUserLocation *)userLocation{ [_mapView updateLocationData :userLocation]; if (userLocation ! = nil) { NSLog(@"%f %f", userLocation.location.coordinate.latitude, userLocation.location.coordinate.longitude

    1.4K20发布于 2018-08-30
  • 来自专栏程思阳的专栏

    微信小程序获取位置信息

    success: (res) => { console.log(JSON.stringify(res)) // res.authSetting['scope.userLocation '] == undefined 表示 初始化进入该页面 // res.authSetting['scope.userLocation'] == false 表示 非初始化进入该页面 ,且未授权 // res.authSetting['scope.userLocation'] == true 表示 地理位置授权 if (res.authSetting ['scope.userLocation'] ! = undefined && res.authSetting['scope.userLocation'] !

    3.3K10编辑于 2022-01-10
  • 来自专栏小程序云开发入门

    微信小程序弹出用户授权弹窗,微信小程序引导用户授权,获取位置经纬度

    res.authSetting['scope.userLocation']) { wx.authorize({ scope: 'scope.userLocation', success 弹窗.png 首先检验用户是否授权位置信息的权限“scope.userLocation”,如果有授权,我们就可以直接去获取用户的位置经纬度了。如果没有授权,我们就弹窗引导用户去设置页。 res.authSetting['scope.userLocation']) { wx.authorize({ scope: 'scope.userLocation', success

    5K40发布于 2020-10-22
  • 来自专栏非典型技术宅

    iOS传感器:利用磁力计完成一个AR场景应用1. 磁力计的介绍2. 磁力计的使用3. 开始我们的小案例

    /** *用户方向更新后,会调用此函数 *@param userLocation 新的用户位置 */ - (void)didUpdateUserHeading:(BMKUserLocation * )userLocation { self.magnetometerInfo.numberOfLines = 0; self.magnetometerInfo.text = [NSString ,userLocation.heading.trueHeading,userLocation.heading.headingAccuracy,userLocation.heading.x,userLocation.heading.y ,userLocation.heading.z]; } 3.4.2 输出用户位置信息:经纬度、高度 /** *用户位置更新后,会调用此函数 *@param userLocation 新的用户位置 ,userLocation.location.coordinate.latitude,userLocation.location.altitude]; } 源代码下载地址:OC下载地址

    2.7K40发布于 2018-06-28
  • 来自专栏技术社区

    微信小程序获取当前位置和城市名

    wx.getSetting接口具体API地址链接为点击打开链接 上图中scope.userLocation就是地理授权的标志; 当该标志是underfind,表示用户初次进入该页面,当该标志是false '] == undefined 表示 初始化进入该页面 // res.authSetting['scope.userLocation'] == false 表示 非初始化进入该页面,且未授权 // res.authSetting['scope.userLocation'] == true 表示 地理位置授权 if (res.authSetting['scope.userLocation = undefined && res.authSetting['scope.userLocation'] ! }) } } }) } } }) } else if (res.authSetting['scope.userLocation

    5K50编辑于 2022-06-16
  • 来自专栏wfaceboss

    微信小程序之wx.getLocation再次授权问题解决

    page外部的getLocation 函数 wx.getSetting({ success: (res) => { if (res.authSetting['scope.userLocation = undefined && res.authSetting['scope.userLocation'] ! success: function (dataAu) { if (dataAu.authSetting["scope.userLocation }) } } }) } else if (res.authSetting['scope.userLocation

    2.2K20发布于 2019-04-08
  • 来自专栏学海无涯

    iOS开发之地图

    的标题实现更改信息 - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation{ CLLocation *location = userLocation.location; CLGeocoder *geocoder = [[CLGeocoder = mark.locality; userLocation.subtitle = mark.thoroughfare; }]; } @end 效果 通过设置地图的MKCoordinateRegion达到 -(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation { CLLocation *location = userLocation.location; //设置地图显示的“区域” //跨度,通过这个精细控制显示的地图视角

    1.8K20发布于 2019-05-10
  • 来自专栏進无尽的文章

    地图| 高德地图源码级使用大全

    onceUserCenter) { coordinate = userLocation.coordinate; [myMapView setCenterCoordinate //定位显示在地图中心 - (void)mapView:(MAMapView *)mapView didUpdateUserLocation:(MAUserLocation *)userLocation updatingLocation:(BOOL)updatingLocation{ if(nil == userLocation || nil == userLocation.heading || userLocation.heading.headingAccuracy < 0) { return; } //获取头部方向 CLLocationDirection theHeading = userLocation.heading.magneticHeading; float direction = theHeading; if(nil !

    5.2K30发布于 2018-09-12
  • 来自专栏DannyHoo的专栏

    iOS开发中使用百度地图计算两点间的距离

    我们在使用到百度地图的项目中可能会需要计算两点间的距离,我们可以很容易通过百度地图的开发文档中找到计算两点间距离的方法: BMKMapPoint point1 = BMKMapPointForCoordinate(userLocation.location.coordinate 在没找到该头文件前我本来是想放弃百度地图的这个方法而使用原生的方法的,原生的方法: CLLocation *location1 = [[CLLocation alloc] initWithLatitude:userLocation.location.coordinate.latitude  longitude:userLocation.location.coordinate.longitude]; CLLocation *location2 = [[CLLocation alloc]

    1.8K21发布于 2018-09-13
  • 来自专栏Java开发

    Java 实战打造城市公园信息管理系统 2025 最新技术实现指南

    ParkDTO> findNearbyParks(double latitude, double longitude, double radius) { // 创建查询点 Point userLocation / 状态定义const searchQuery = ref('');const parks = ref<ParkDTO[]>([]);const loading = ref(false);const userLocation ) { // 按当前位置搜索附近公园 const response = await getNearbyParks({ latitude: userLocation.value.latitude , longitude: userLocation.value.longitude, radius: 2000 }); parks.value = response.data (navigator.geolocation) { navigator.geolocation.getCurrentPosition( (position) => { userLocation.value

    23810编辑于 2025-08-16
  • 来自专栏陈满iOS

    iOS·采用第三方(百度地图SDK)实现定位等功能开发

    { NSLog(@"didUpdateUserLocation lat %f,long %f",userLocation.location.coordinate.latitude, userLocation.location.coordinate.longitude); //从manager获取左边 CLLocationCoordinate2D coordinate :coordinate]; if ((userLocation.location.coordinate.latitude ! = 0 || userLocation.location.coordinate.longitude ! = 0 && _locService.userLocation.location.coordinate.latitude!

    2.5K30发布于 2018-09-10
  • 来自专栏bug收集

    微信小程序getLocation等定位调用失败的处理方法

    "mp-weixin": { "appid": "你的开发者id", "usingComponents": true, "permission": { "scope.userLocation { "pages": ["pages/index/index"], "permission": { "scope.userLocation": { "desc": "你的位置信息将用于小程序位置接口的效果展示

    5.1K10编辑于 2024-01-12
  • 来自专栏猫头虎博客专区

    [猫头虎分享21天微信小程序基础入门教程]第7天:小程序的权限与API使用

    { "permission": { "scope.userLocation": { "desc": "你的位置信息将用于小程序的位置接口功能" } } } 检查权限 res.authSetting['scope.userLocation']) { wx.authorize({ scope: 'scope.userLocation',

    62110编辑于 2024-05-14
  • 来自专栏腾讯位置服务

    微信小程序结合腾讯地图获取用户所在城市信息

    步中获得的经纬度信息通过腾讯地图的接口逆地址解析,涉及腾讯地图接口为reverseGeocoder(options:Object) 在小程序中获取当前的地理位置 在小程序中,调用wx.getLocation,使用前需要用户授权scope.userLocation res.authSetting\['scope.userLocation'\]) { wx.authorize({ scope: 'scope.userLocation 运行后会提示如下信息,还需要在 app.json 中配置permission字段 [izy2qnr4ss.png] 查询文档后得知,得知需要如下配置 "permission": { "scope.userLocation

    2.5K20发布于 2020-08-28
  • 来自专栏腾讯位置服务

    微信小程序类快递自动填写收发货地址功能

    '] == undefined 表示 初始化进入该页面 // res.authSetting['scope.userLocation'] == false 表示 非初始化进入该页面 ,且未授权 // res.authSetting['scope.userLocation'] == true 表示 地理位置授权 if (res.authSetting ['scope.userLocation'] ! = undefined && res.authSetting['scope.userLocation'] ! success: function (dataAu) { if (dataAu.authSetting["scope.userLocation

    2K61发布于 2021-03-26
  • 来自专栏小程序云开发入门

    小程序地图学习之获取位置 获取经纬度 获取地名 获取地址

    navigationBarTitleText": "WeChat", "navigationBarTextStyle": "black" }, "permission": { "scope.userLocation res.authSetting['scope.userLocation']) { wx.authorize({ scope: 'scope.userLocation', res.authSetting['scope.userLocation']) { wx.authorize({ scope: 'scope.userLocation',

    2.1K20发布于 2020-10-22
  • 来自专栏站长的编程笔记

    微信小程序位置 API

    wx.chooseLocation.html 在 app.json 中添加 permission 字段, 否则在开发者工具上可以调起位置选择, 在手机上无法调起 站长源码网 "permission":{ "scope.userLocation res.authSetting["scope.userLocation"]){ wx.showToast({ title

    1.7K20编辑于 2023-01-08
  • 来自专栏全栈开发那些事

    微信小程序权限接口

    scope 对应接口 描述 scope.userLocation wx.getLocation, wx.chooseLocation, wx.startLocationUpdate 地理位置 scope.userLocationBackground console.log(res.authSetting) // res.authSetting = { // "scope.userInfo": true, // "scope.userLocation console.log(res.authSetting) // res.authSetting = { // "scope.userInfo": true, // "scope.userLocation res.authSetting['scope.userLocation']) { wx.authorize({ //授权 scope: 'scope.userLocation } }) location()1函数实现获取地理位置的功能,该函数先调用wx.getSetting()接口获取权限状态,然后调用wx.authorize()接口修改地理位置权限scope.userLocation

    3.8K20编辑于 2023-02-25
领券