ThingWorx Extensibility > Extensions > Google Widgets
  
Google Widgets
Google Maps is a web mapping service application and technology provided by Google. With the ThingWorx Google Widgets extension package, you can select and plot geographical locations on a map from within ThingWorx. There is also a location picker, which you can use in a Mashup to set a location using selection on the Google map.
* 
The Google Widgets extension contains Google Maps. You are responsible for obtaining any needed license. For more information, review Google Maps Usage Limits and Billing.
To use the Google widgets extension package, download and import the GoogleWidgets_ExtensionPackage.zip into ThingWorx. The package imports the following into ThingWorx:
Googlelocation widget
Googlemap widget
DefaultMapRegionSelectedStyle Style Definition (default map region selected style.)
Using the Google Map widget 3.0.2 and later versions
To use the widget in ThingWorx, you must get and implement your own Google Maps API key or Client ID (for the Google Maps API for Work licenses). Refer to either Google Maps API documentation or Client ID Information and follow the steps below after obtaining an API key or Client ID.
* 
Refer to the section Upgrading from v2 to v3 to understand the updates to the API key that is made by Google. If you use the old URL https://maps.google.com/maps/api/js?sensor=false&key=YOUR_API_KEY or v2 of the API key , an error “FOR DEVELOPMENT PURPOSE ONLY” message is displayed. You must then regenerate the API key as per the updates made by Google.
* 
For more information about managing APIs, refer to Managing APIs.
* 
The Google Map widget 3.0.2 and later versions are compatible only with ThingWorx platform 8.2.8+ and 8.3.3+ versions.
1. Download the Google Widgets extension into a directory of your choosing.
2. In the ThingWorx Composer, navigate to Subsystem > PlatformSubsystem > Services.
3. Search and locate GetGoogleMapConnectionString and SetGoogleMapConnectionString.
* 
You can select the GetGoogleMapConnectionString and click Execute to verify the connection string.
4. Select the SetGoogleMapConnectionString and enter the URL that includes your API key in the field.
5. Click Save Input Set and then click Execute.
6. Import the extension into ThingWorx and start using the Google Map widget in your mashup.
Using the Google Map widget 3.0.1 and earlier versions
* 
It is recommended to upgrade to the latest version of the Google Map widget.
To use the widget in ThingWorx, you must get and implement your own Google Maps API key or Client ID (for the Google Maps API for Work licenses). Refer to either Google Maps API documentation or Client ID Information and follow the steps below after obtaining an API key or Client ID.
* 
Refer to the section Upgrading from v2 to v3 to understand the updates to the API key that is made by Google. If you use the old URL https://maps.google.com/maps/api/js?sensor=false&key=YOUR_API_KEY or v2 of the API key , an error “FOR DEVELOPMENT PURPOSE ONLY” message is displayed. You must then regenerate the API key as per the updates made by Google.
* 
For more information about managing APIs, refer to Managing APIs.
1. Extract the Google Widgets extension into a directory of your choosing.
2. Under the googlemap widget entry in the metadata.xml file, update the google API URL to include your API key or Client ID. The updated URL should appear similar to one of the following:
https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY
Google Maps API for Work licenses: <script src="https://maps.googleapis.com/maps/api/js?client=YOUR_CLIENT_ID&amp;v=3.21"</script>
3. Rezip the extension and import it into ThingWorx.