alexpechkarev / google-maps

Collection of Google Maps API Web Services for Laravel
https://alexpechkarev.github.io/google-maps/
MIT License
523 stars 115 forks source link

containsLocation not work #39

Closed messi89 closed 6 years ago

messi89 commented 6 years ago

I test the doc example but it always return false, is there any thing wrong ?

`$response = \GoogleMaps::load('directions') ->setParam([ 'origin' => 'place_id:ChIJ685WIFYViEgRHlHvBbiD5nE', 'destination' => 'place_id:ChIJA01I-8YVhkgRGJb0fW4UX7Y', ]) ->containsLocation(55.86483,-4.25161);

dd( $response  );  // true`

I try my api key with google example here https://developers.google.com/maps/documentation/javascript/examples/poly-containsLocation it work

messi89 commented 6 years ago

finaly I used isLocationOnEdge with tolerance in meters

problem solved

alexpechkarev commented 6 years ago

Glad to hear, thanks!