Setting up maps
CentralSquare Mobiles uses Google's JavaScript API for rendering the map and getting directions.
For maps and routing to work properly, each agency must provide its own Google API key. This API key must be provided to the installation team, who will configure the CentralSquare Mobiles API so that any person using that environment can view maps.
CentralSquare Mobiles uses Google's Directions API and Maps JavaScript API.
To generate and set up a Google API key for use with CentralSquare Mobiles:
- Go to Google's Console: https://console.cloud.google.com/welcome?.
- If you already have an account, log in. Otherwise, create an account.
-
Select a project or create one for your agency.
Tip: When looking at the dashboard for your project, select Credentials to see your API keys.
- If your agency does not have an existing API key, create one by selecting APIs & Services > Credentials. Select +CREATE CREDENTIALS > API key.
-
Open the Enabled APIs & services page. From this page, you can enable specific APIs and services:
- Search for the Maps JavaScript API and enable it.
- Search for the Directions API and enable it.
-
Go to the Credentials page.
-
In the API Keys section, choose the API key you want to work with. The Edit API key page appears, where you can set restrictions:
- Leave Application restrictions as None.
- For API restrictions, restrict the key and restrict the usage to the Directions API and Maps JavaScript API.
Note: You can allow more permissions if your agency uses this key for other products as well; however, the Directions API and the Maps JavaScript API must be enabled.
-
Provide the key to CentralSquare support, who will update the Mobiles API with the key. You can find your key from the menu by selecting APIs & Services > Credentials > API Keys.
Tip: You can manage the key and add restrictions from APIs & Services > Credentials > API Keys.
For Google documentation, refer to https://support.google.com/googleapi/answer/6158862?hl=en.