Business Console 10.7 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Getting Started | Using Third Party Libraries
 
Using Third Party Libraries
 
Writing User Interface Code for Using Third-party Libraries in Gadget
Styling the Gadget
Writing Custom Maps Directive in custom.js File
Coding the Gadget Controller
Deploying and Testing Maps Gadgets
If you want a gadget to accept one or more locations as input and plot these locations in a Google Map. The gadget must use Maps API
Google Maps is one of the most popular libraries, which provides a map implementation. However, to use Google Maps in gadget, you need an API Key. You can use a standard API key or use a premium Key if you have Maps license.
To generate your API key, use URL https://developers.google.com/maps/documentation/javascript/get-api-key. Most of the third party libraries can be downloaded in your local system and then these library files can be added under the scripts folder.
Google Maps restricts the use of maps by downloading. Gadget code must directly refer to Google maps library. This leads to synchronization issue as the gadget has to wait for the library to be loaded from the URL. To achieve this, gadget framework includes a lazyLoader (ocLazyLoader) module to load all the modules.