Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Geocoder.ca seems to be wildly off #10

Closed
Forbin opened this issue Feb 13, 2014 · 4 comments
Closed

Implementation of Geocoder.ca seems to be wildly off #10

Forbin opened this issue Feb 13, 2014 · 4 comments

Comments

@Forbin
Copy link

Forbin commented Feb 13, 2014

While it came back with many results, they were off by quite a bit. I called geocoder.ca and they passed the same string into their system and it came back accurately. For example http://geocoder.ca/?locate=630+University+Ave%2C+Palo+Alto%2C+CA%0994301-2019&geoit=GeoCode works in their system, but when I pass the string "630 University Ave, Palo Alto, CA 94301-2019" your system ( with 'provider' => 'Geocoder\Provider\GeocoderCaProvider') returns 38.3241329,-122.7146332, which is very off. All the results all over the country seem to be off by many many many miles. I am using what I believe to be the proper method (below). Am I doing this wrong?

$location = \Geocoder::geocode($geo_address);
$address_info['coords'] = $location->getLatitude().','.$location->getLongitude();

@toin0u
Copy link
Member

toin0u commented Feb 14, 2014

I do not have issue this this provider. Can you provide a gist about your controller method ?

@Forbin
Copy link
Author

Forbin commented Feb 14, 2014

https://gist.github.com/Forbin/d7a01d010bf3b3baa905 However, I am getting accurate results using the ArcGISOnlineProvider. So I am happy, thank you for your geocoder tool!

@Forbin
Copy link
Author

Forbin commented Feb 14, 2014

It could be because I found that Geocoder.ca requires that you purchase credits and I had not done that.

@toin0u
Copy link
Member

toin0u commented Feb 14, 2014

Great that you found what you're looking for !

But the GeocoderCaProvider works normal as you can see:

object(Geocoder\Result\Geocoded)[147]
  protected 'latitude' => float 37.449798
  protected 'longitude' => float -122.157775
  ...

Geocoder.ca provides:
screen shot 2014-02-14 at 16 32 40

The problem is coming from the way to build the address via your variable: $geo_address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants