没有从纬度和经度获得正确的地址(Not getting a correct address from Latitude & Longitude)
我想从纬度和经度中获得真正的邮政地址,但效果不佳。 也许我注意到使用正确的API等。
例如,我有以下代码
var location = CLLocation(latitude:currentLocation.coordinate.latitude, longitude: currentLocation.coordinate.longitude) CLGeocoder().reverseGeocodeLocation(location, completionHandler: {(placemarks, error) -> Void in print(location) if error != nil { print("Reverse geocoder failed with error" + error!.localizedDescription) return } if placemarks!.count > 0 { let pm = placemarks![0] as! CLPlacemark street = String(pm.thoroughfare!) city = String(pm.locality!) state = String(pm.administrativeArea!) print(pm.locality) print(pm.administrativeArea) print(pm.thoroughfare) self.utility.setMyLocation(dName, longitude: long, latitude: lat, street: street, city: city, state: state) locManager.stopUpdatingLocation() } else { print("Problem with the data received from geocoder") } })
但是我没有得到真正的地址。 例如,假设该long和lat地址是
东街123号
我得到的东西只有东街(没有号码)或靠近公路。
为了获得真实地址,我需要做什么?
I want to get the true postal address from the Latitude & Longitude, however is not working well. Maybe I am note using the right APIs or etc.
For example I have the following code
var location = CLLocation(latitude:currentLocation.coordinate.latitude, longitude: currentLocation.coordinate.longitude) CLGeocoder().reverseGeocodeLocation(location, completionHandler: {(placemarks, error) -> Void in print(location) if error != nil { print("Reverse geocoder failed with error" + error!.localizedDescription) return } if placemarks!.count > 0 { let pm = placemarks![0] as! CLPlacemark street = String(pm.thoroughfare!) city = String(pm.locality!) state = String(pm.administrativeArea!) print(pm.locality) print(pm.administrativeArea) print(pm.thoroughfare) self.utility.setMyLocation(dName, longitude: long, latitude: lat, street: street, city: city, state: state) locManager.stopUpdatingLocation() } else { print("Problem with the data received from geocoder") } })
However I am not getting the true address. For example let say if that long and lat address is
123 East Street
I get something like only East Street (with no number) or near by road.
What do I need to do inorder to get the real address?
原文:https://stackoverflow.com/questions/35243120
最满意答案
刚刚找到这个链接,看起来它可能是一个可能的答案。 设置连接的ClientId。 看起来很简单。
Just found this Link and it looks like it could be a possible answer. Set the ClientId of the connection. Seems simple enough.
相关问答
更多-
解决了 - 这是sqlalchemy的一个悬而未决的问题,将在下一个版本中得到解决 Solved - this is an open issue with sqlalchemy, will be solved in the next release
-
可能的答案 刚刚找到这个链接,看起来它可能是一个可能的答案。 设置连接的ClientId。 看起来很简单。 possible Answer Just found this Link and it looks like it could be a possible answer. Set the ClientId of the connection. Seems simple enough.
-
在()中,您的代码应该是Oracle SQL代码。 你写的是一个显式的传递查询。 括号中的SQL代码将传递给Oracle并在那里执行。 然后,查询结果将被发送回SAS并成为PT表。 如果您要提交包含SAS特定语言的代码(例如数据步骤代码甚至使用SAS特定功能的SQL),您将收到错误,因为Oracle不理解它。 Within the () your code should be Oracle SQL code. What you have written is an explicit pass-through ...
-
Oracle连接问题(Oracle Connection Problem)[2022-04-09]
尝试将环境变量TNS_ADMIN设置为指向tnsnames.ora文件所在的目录。 这会告诉你,如果你的客户找到适当的Ora Networking文件有问题。 编辑:什么是视觉工作室的路径名称? 它里面是否有parens,例如“C:\ Program Files(x86)\ Microsoft Visual Studio \”? 如果是这样,这个场景中就有一个已知的bug。 修复方法是安装修补程序,或者将Visual Studio重新安装到路径中没有保留位置的位置。 Try setting the envi ... -
尝试将驱动程序类型设置为thin 。 properties.put("driverType", "thin"); try to set the driver type to thin. properties.put("driverType", "thin");
-
与PHP的Oracle DB连接(Oracle DB connection with PHP)[2022-03-18]
为了使用oci8模块,除了启用php_oci8.dll之外,您还需要安装Oracle客户端。 您可以尝试使用Oracle 10gR2 Instant Client或Oracle 11gR2 Instant Client 从这里下载: http : //www.oracle.com/technetwork/topics/winsoft-085727.html 我建议使用10.2.0.5版本的Instant Client Package - Basic Lite In order to use oci8 mod ... -
这是你需要做的纠正它。 安装32位客户端与64位一端.. 64位版本在使用标准连接字符串方面不起作用..不确定Oracle如何在不修复它的情况下让这个bug持续这么长时间..并排安装是什么我们做了..它将安装到它自己的文件夹中所以你应该没有问题..当你使用.dll时只需将副本设置为local = true并删除旧的并重新添加新的.dll ..确保你使用导航到4.x文件夹而不是2.x文件夹。 this is what you will need to do to correct it . Install th ...
-
ORA-12705错误表明这可能是区域设置问题。 您可以尝试在转换为NLS时使用Oracle XE支持的语言环境启动JBoss。 例如,尝试将此添加到JBoss启动配置( jboss-as/bin/run.conf JAVA_OPTS变量): -Duser.language=en -Duser.country=US The ORA-12705 error suggests that this might be a locale issue. You could try starting up JBoss ...
-
该错误(无法获取Oracle环境句柄)是Oracle告诉您配置有问题的方法。 在您的情况下,您有不同的路径,可能是问题的根源。 一个说“/ oracle / oracle-client”,另一个说“/ oracle / client”。 你应该找出哪一个是正确的,并相应地调整事情。 您可以使用SQL * Plus连接到数据库。 如果有效,那么cx_Oracle也应该有效。 您也可以使用ldd命令来确定系统是否找到了正确的库。 喜欢这个: ldd /path/to/cx_Oracle.so 如果您有针对12 ...
-
微软在2月9日发布了一个补丁,导致了这个问题。 它现在被列为已知问题。 https://support.microsoft.com/en-us/kb/3126587 Microsoft released a patch on the 9th of Feb, which has been causing this issue. Its now listed as a known issue. https://support.microsoft.com/en-us/kb/3126587