According to various references, Google Maps has a query param called sll
which does the following:
Latitude,longitude of the point from which the business search should be performed. You could use this to perform an off-centre busness search. Google use it so "link to this page" can record a map that has had the centre moved after performing a business search. When requesting a route
map.getBounds().getSouthWest().toUrlValue()
returns the same value maps.google.com uses.
So, for instance, if (43.464258, -80.52041)
happens to be in Waterloo, Ontario, and (42.24370, -82.98320)
happens to be in Windsor, Ontario (many hundreds of kilometers away), then my interpretation of the above documentation would be that the following query:
https://maps.google.ca/maps?saddr=43.464258,-80.52041&daddr=mcdonalds&sll=42.24370,-82.98320
will do a search for "Mcdonalds" from Waterloo, to some McDonald's in Windsor.
Unfortunately, that's not what happens (click for yourself to see!). It ends up doing a search from the saddr
point, to the nearest McDonald's to that point. The value of sll
doesn't factor into it at all.
But here's where it gets weird! If I omit the sll
parameter entirely, then Maps does something completely unexpected: it picks some random McDonald's in Toronto (a city that is many kilometers away from either Waterloo or Windsor). I need to add some sll
parameter (for any value) to make Maps return a result in Waterloo (even though what I'm asking for is a result in Windsor).
Am I misinterpreting all the various sources of documentation about this parameter? Is this a bug on Maps' end? And, most importantly, is there any working way to do what I'm trying to do, even if it doesn't involve the sll
parameter at all?