Tests and improvements#4
Conversation
…rly. Set default value of loi to false (displays a modal to Safari users for example). Improved and formalized error handling.
Options will be refactored in another branch.
…() after init, removes an error case and decreases code), renamed "options.positionOptions" to "options.position" and renamed "watcher" to "observe" (verbal forms are better but "watch" is forbidden according to original author). Uniformized documentation and made it more concise.
Refactored and optimized code. Updated and improved documentation.
Made the locate() and watcher() methods chainable. Merge branch 'options'
|
Hi, Thank you for your changes! I will give you a hint (and credits) when I merge everything together! Greetings, |
|
Woops, I just realized that I had messed up with my branches!! The pull request should concern only my master branch up to commit 38d9053d4956f2b30df3, plus the 653070eb9c59f3b6f7b4 commit that adds tests. I won't clean this up immediately, in case you decide to include my MSG changes, but I am really not trying to force this on you, you can decide to merge only the improvements, not my architectural considerations ;) |
Hi Christopher,
Here are some improvements I made to Locate :)
They are all keeping compatibility with your original code, but I would recommend that you take a look at my MSG branch, which breaks compatibility with Locate < 1.3, but is IMHO cleaner (still needs improvements over address getting, but since we have dependencies to Google Maps anyway, I'm thinking about extracting this into yet another file and use Gmaps API v3).
I'm not sure if you had tested your distanceTo() method, but according to my test file your original version does not calculate properly… Again, if you can confirm this, please consider integrating my MSG branch :)
Thanks for the original code!
Greetings,
Matti