javascript - Google Maps Api check if place is on the route - Stack Overflow
javascript - Google Maps Api check if place is on the route - Stack Overflow
Home Google Maps Api check if place is on the route Ask Question
PUBLIC Asked 8 years, 10 months ago Modified 5 years, 6 months ago Viewed 7k times
Questions
I made with Google Maps an route between two places. Thats works fine.
Tags The Overflow Blog
Users 3 But i also have an database with interesting points on different roads in my country. I like to show
When to use gRPC vs GraphQL
them if they are on the generated route. Places who are not one this route, don't need to be shown.
Companies From Twitter Bootstrap to VP of
My database with intereseting points contains latitude and longitude coordinates. Engineering at Patreon, a chat with
COLLECTIVES Utkarsh...
Explore Collectives How can i check is they are on my route? There are approximately 30 or 40 interesting point in my
Featured on Meta
database.
TEAMS
Inbox improvements are live
// set request
Stack Overflow for var request = { Help us identify new roles for community
Teams – Start origin: initialLocation, members
collaborating and destination: destination,
sharing organizational travelMode: google.maps.TravelMode.DRIVING 2022 Community Moderator Election
knowledge. }; Results
Share Follow edited Jan 10, 2014 at 7:01 asked Jan 7, 2014 at 15:05 Proving ownership of a pseudonym
possible duplicate of How to to Get Places (e.g Gas Stations) along Route Between Origin and Destination in The contradictions between agile approach and
Google Maps API, use your database instead of the places API. – geocodezip Jan 7, 2014 at 15:39 the growth of individual team member
Where are you using isLocationOnEdge ? How does your program know when to place a marker on the Is it believable that a civilization is governed under
one country?
line? – Tyler Eich Jan 10, 2014 at 21:06
If I add a misrepresentation clause to 3-clause BSD
new google.maps.Marker creates the marker. The var is only to store the marker in a later stadium. – JelleP license would it remain GPL-compatible?
Jan 13, 2014 at 6:56
Generalization of Chinese remainder theorem to
non-normal subgroups
Add a comment
How do you simulate resistor noise with LTSpice?
2 Answers Sorted by: Highest score (default) Why do most of my games have graphics errors
on my Windows ME retro PC?
KDF aftertaste?
Share Follow answered May 11, 2017 at 13:43
True/False ACF field returning null by default even
Felix Kirathe if default value is true
41 4
1 http://maps.googleapis.com/maps/api/js?
v=3.exp& libraries=geometry &sensor=TRUE_OR_FALSE
Pseudo-code:
Share Follow edited Jan 7, 2014 at 20:41 answered Jan 7, 2014 at 16:15
Tyler Eich
4,219 3 21 44
Thank your for the comment! This is what i search for. I only get one error rightnow. Did it like: myLatlng =
new google.maps.LatLng(latlng[0],latlng[1]); if
(isLocationOnEdge(myLatlng,response.routes[0].overview_path)) { } error: "TypeError: b.get is not a function"
– JelleP Jan 8, 2014 at 6:58
1 It's hard to say without more code, but it looks like new google.maps.LatLng(latlng[0],
latlng[1]) is your problem. It appears that you are sending two latLng s to create a new latLng . The
API requires two numbers. So google.maps.LatLng(Number, Number) should be better. – Tyler Eich
Jan 8, 2014 at 12:34
I added some code in my question. My error is solved but the script doesn't work yet. – JelleP Jan 10, 2014
at 7:03
Add a comment
Your Answer
Post Your Answer By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged javascript google-maps or ask
your own question.
STACK OVERFLOW PRODUCTS COMPANY STACK EXCHANGE NETWORK Blog Facebook Twitter LinkedIn Instagram