GoogleMapsRoutePlanner

Content Type: Widget
Categories: User Interface

Overview

Add a route planner based on Google Maps webservices on your webpage to quickly get the best route including multiple waypoints, alternative routes and travelmodes. See the demo project, also available in the Marketplace, for a correct implementation.

Documentation

Demo urlhttps://googlemapsrouteplanner-sandbox.mxapps.io/login.html

GoogleMapsRoutePlanner

Add a route planner based on Google Maps webservices on your webpage to quickly get the best route including multiple waypoints, alternative routes and travelmodes. See the demo project for a correct implementation.

See all features in action here: https://googlemapsrouteplanner-sandbox.mxapps.io/

This widget uses React / TypeScript and the new pluggable widgets API. Additional features:

Features

  • Get distance and direction for a given route
  • Based on either arrival time or departure time
  • Select to get alternative routes, which can be chosen from a modal popup
  • Make markers draggable, updating route directly
  • SearchBox option to being able to zoom so specific region

Usage

  • API Key:

    • Production: If you want to use the widget in Production a valid Google Maps API key needs to be entered in every widget instance.
    • Development: Developing can be done without an API key, but will show messages on top of the Google Map, making it unusable in Production.
  • Add the Google Maps Route Planner widget to your page, see screenshots for Settings in Studio Pro or even better download the demo project available here:

  • At least configure all attributes in the Data source tab

Demo project

https://googlemapsrouteplanner-sandbox.mxapps.io/

Issues, suggestions and feature requests

None known as of now.

Development and contribution

Thanks to the team maintaining the React Google Maps API library, see https://www.npmjs.com/package/@vis.gl/react-google-maps

Releases

Version: 2.0.0
Framework Version: 9.24.19
Release Notes: 1. Moved to vis-gl/react-google-maps library 2. Added SearchBox option to being able to zoom so specific region 3. Added alternative routes option. 4. Added draggable markers option 5. Updated error handling for invalid requests
Version: 1.1.0
Framework Version: 9.24.1
Release Notes: - Upgraded to Mendix 8.2.2. - Removed Resize function content. - Cleaned up code slightly.