A little bit of background: @David during the development of his awesome Manipur Go app asked how to open Google Maps to navigate to a specific location. It seemed like a good challenge, so I jumped right in. Once that was done, I implemented a location picker, and that gave rise to NavDemo. This code was adapted by David, and he says others might find this useful, so here I am.
- Google Maps-based location picker.
- Auto-centering on user on initialization.
- Click to add marker (and hence pick location).
- Hold and drag marker to adjust location.
- Auto-centering on a moving marker.
- Navigate to coordinates.
- Navigate to an address.
- Opens navigation route in Google Maps.
- Route is opened in a browser if Google maps is not installed on the device.
The Navigator works even if Google Maps is not installed on the device, but the Picker will cause a runtime error on Init if the app is not installed. The Navigator and Picker are independent, so you can choose to remove the Picker if you want to prevent errors at all costs.
The template is offered with no strings attached. However, I would love to know of apps that utilize it (like David’s app ). A mention in your app’s About or Acknowledgements would be appreciated.
Do report bugs and all that.