Documentation – Directions for OpenLayers

WP Google Maps – Pro add-on version 8 introduces Directions for OpenLayers via the OpenRouteService.

This documentation covers getting OpenRouteService setup, and setting your OpenRouteService key into WP Google Maps, in order to enable Directions for OpenLayers.

You can see a demo of this feature here.

Creating an OpenRouteService API Key

Firstly, please navigate to the OpenRouteService developer login page.

From there please login, or create an account.

Once logged in, please click “Create Token” from the developer dashboard

Please note that API keys have daily usage limitations. You can apply for a paid key if you wish to increase your daily quota beyond the free provision.

Once your key is created, from the dashboard, click on the key to copy it to your clipboard.

Inserting your API key

Please then navigate to Maps -> Settings.

You will need to have already set Maps Engine API to “OpenLayers”. The OpenRouteService API Key field will not be visible with Google selected.

Under the Advanced tab, you can paste your OpenRouteService key. Remember to save your settings.

Enabling Directions

Please then go to Maps -> Edit -> Directions. You can now enable Directions for your OpenLayers map.

Was this article helpful to you?