Git Product home page Git Product logo

Comments (20)

zhuorantan avatar zhuorantan commented on August 17, 2024

Hi,

That's weird. Does this happen for any location?

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

Yes for all locations.

from locationpicker.

zhuorantan avatar zhuorantan commented on August 17, 2024

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

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

I am using pods. won't it get overwritten if I refresh the code later?

from locationpicker.

zhuorantan avatar zhuorantan commented on August 17, 2024

I just want to make sure if this is what causes the problem. I will fix the issue and release an update.

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

better but still jumping a little. Pls see the screenshot
map5

from locationpicker.

zhuorantan avatar zhuorantan commented on August 17, 2024

Clearly the screenshots were taken on simulator, have you tried on devices? Are you using iOS 10 SDK?

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

No I am on iOS 9. Will try on device in the evening and report back.

Thanks.

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

Ran on iPhone 6. Result is similar to previous gif.

However, sometimes jumps are bigger as shown in first gif.

from locationpicker.

zhuorantan avatar zhuorantan commented on August 17, 2024

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.

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

Okay thanks. Appreciate your response and fix.
On Sat, Aug 6, 2016 at 7:26 AM Jerome Tan [email protected] 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
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEtS5PBlukM1_WRUJQbuyIprLFCVJX64ks5qc-nrgaJpZM4Jc8cY
.

Regards,
Ashish

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

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'

from locationpicker.

zhuorantan avatar zhuorantan commented on August 17, 2024

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'

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

Okay thanks.

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

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)


}`

from locationpicker.

zhuorantan avatar zhuorantan commented on August 17, 2024

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.

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

Okay thanks

from locationpicker.

arno608rw avatar arno608rw commented on August 17, 2024

I have the same problem and i use .isRedirectToExactCoordinate = false;

test

from locationpicker.

arno608rw avatar arno608rw commented on August 17, 2024

@ashish-naik Please tell me how to solve

from locationpicker.

ashish-naik avatar ashish-naik commented on August 17, 2024

No i couldn't solve it and parked it for time being. Pls try Jerome's suggestion. Hope you find the solution.

from locationpicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.