-2

www.allezroulez.be is a project from a few years ago. I have a totally different job right now but i want to get back to it. First i got an error from Google maps that i fixed because they renewed something. But now the map generator still doesn't work because of a callback is not defined error.

I'm glad this all worked years ago, but i want to fix it. Do you know what the exact mistake is and why it worked years a go but not at this moment?

main goal of this site is to calculate a route based on amount of km and stops at pubs and restaurants. Best practice is to generate a route in Belgium (pretty flat surface) from around 50km for example.

Thank you to take your time for this, i appreciate it. It's just a little step to get me back in to it, but it holds me back somehow.

Thanks again! (everything is done with JavaScript so all files are accessible i think?)

Onovar
  • 729
  • 1
  • 7
  • 19

1 Answers1

0

move this line:

service.nearbySearch(request, callback);

after the function callback

Dr.Molle
  • 116,463
  • 16
  • 195
  • 201
  • Now he keeps looking for a matching route, but won't find one. The problem is that i know it worked a year ago so... – Onovar Oct 09 '15 at 13:19
  • the problem is that you try to access undocumented properties. In `PrepareForRouting` you access the properties `A` and `F` of a LatLng, these properties are not documented (and probably did only work for a couple of days). See: http://stackoverflow.com/questions/21066167/something-happened-to-my-google-map-api-script/21066449#21066449 – Dr.Molle Oct 11 '15 at 00:44
  • how can i access user_latitude? If not user_location["F"], i can't say = new google.maps.LatLng(point.latitude); – Onovar Feb 25 '16 at 14:18