Hi Tracy,
I've never set up the client to use a dynamic start location, but there are a couple ways you might try doing this:
- dynamically generate config.js to include the desired initLatLng prior to loading the client
- if you are modifying the core client code, you could set otp.config.initLatLng programatically. This could be done in the initialize() method of otp.core.Webapp (just make sure it's done before otp.core.Map is initialized)
Just curious, what are you using for geolocation? I've never played around with it, but Leaflet's L.Map object does have a built-in locate() method that is supposed to work on most modern browsers. If you're OK using that, it would be simple enough to add a new otp.config property (e.g. 'enableGeolocation') that would tell the client to try that first, falling back on otp.config.initLatLng or the OTP graph metadata as needed.
DDE