Closed ashish-naik closed 8 years ago
Hi,
That's weird. Does this happen for any location?
Yes for all locations.
Try removing the use of func gcj2wgs
in line 1005 of file LocationPicker.swift:
replace
let revisedCoordinate = gcj2wgs(mapView.centerCoordinate)
with
let revisedCoordinate = mapView.centerCoordinate
I am using pods. won't it get overwritten if I refresh the code later?
I just want to make sure if this is what causes the problem. I will fix the issue and release an update.
better but still jumping a little. Pls see the screenshot
Clearly the screenshots were taken on simulator, have you tried on devices? Are you using iOS 10 SDK?
No I am on iOS 9. Will try on device in the evening and report back.
Thanks.
Ran on iPhone 6. Result is similar to previous gif.
However, sometimes jumps are bigger as shown in first gif.
It seems that maybe Apple has updated it's map server. So when it received a reverse-geocoding request, it always return a nearby location even if it's quite a long distance away. I added a new Bool value var isRedirectToExactCoordinate
, default is true
. If you don't want to be redirected, just set it to false
. Upgrade to version 2.0.0 and you can find it.
Okay thanks. Appreciate your response and fix. On Sat, Aug 6, 2016 at 7:26 AM Jerome Tan notifications@github.com wrote:
It seems that maybe Apple has updated it's map server. So when it received a reverse-geocoding request, it always return a nearby location even if it's quite a long distance away. I added a new Bool value var isRedirectToExactCoordinate, default is true. If you don't want to be redirected, just set it to false. Upgrade to version 2.0.0 and you can find it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JeromeTan1997/LocationPicker/issues/12#issuecomment-237999877, or mute the thread https://github.com/notifications/unsubscribe-auth/AEtS5PBlukM1_WRUJQbuyIprLFCVJX64ks5qc-nrgaJpZM4Jc8cY .
Regards, Ashish
Hi Jerome,
I am not able to update 2.0.0 using pod file. getting below error.
[!] Unable to satisfy the following requirements:
- LocationPickerViewController (~> 2.0.0)
required by Podfile
my pod file has below line. pod 'LocationPickerViewController', '~> 2.0.0'
and below output of pod search LocationPickerViewController
-> LocationPickerViewController (1.2.0) A ready for use and fully customizable location picker for your app. pod 'LocationPickerViewController', '~> 1.2.0'
Sorry, I'm still trying to push the pod. My Cocoapods client is experiencing an issue with Xcode 8 beta 4. A workaround is changing the Podfile to pod 'LocationPickerViewController', '~> 2.0.0', git: 'https://github.com/JeromeTan1997/LocationPicker.git'
Okay thanks.
Hi Jerome,
This is still not working unfortunately. Showing same behaviour. Below is my code
I checked on iphone 6 and simulator both.
` func pickLocation(sender: AnyObject) {
let customLocationPicker = CustomLocationPicker()
customLocationPicker.viewController = self
customLocationPicker.mapViewZoomEnabled = true
customLocationPicker.isRedirectToExactCoordinate = false
let navigationController = UINavigationController(rootViewController: customLocationPicker)
presentViewController(navigationController, animated: true, completion: nil)
}`
I did some research and found that India also adopts a different coordinate system from the standard WGS84. I only adjusted the coordinate for China which adopts GCJ02. I believe you will have to find how to transform your country's coordinate system to WGS84. Apple has transformed the coordinate system for China in iOS 10, you can try it to see whether the problem solved.
Okay thanks
I have the same problem and i use .isRedirectToExactCoordinate = false;
@ashish-naik Please tell me how to solve
No i couldn't solve it and parked it for time being. Pls try Jerome's suggestion. Hope you find the solution.
Hi,
I find LocationPicker very easy to use however facing an issue.
The place mark moves randomly. Please see attached. How to fix this?
Thanks Ashish