Extending Widgets - Possible to add a new script/api?

Hi everybody, I'm currently struggling with the creation of my own widget. It should be an extension on the googlemaps widget (it closely relates to this question i had regarding polygon drawings (https://forum.mendix.com/link/questions/90618 ) So I've taken the googlemaps widget as a starting point. I've read/viewed all the posts regarding the helloworld widget example and that looks quite logical to me, but how to extend it? I've got no idea. Lets say I'd like to add the drawing library of google, should it be added in the googlemaps.js file or in the jsapi.js file? I understand how it works to add a library to a JS file, pass it to the constructor and creating the instance of it, but I'm confused.  Any one some tips and/or examples? Kind regards and all the best Laurens
1 answers

Hello Laurens, 

You should be able to add js libraries directly into your src/<widgetname>/lib folder and reference them in your widget code through your widget declaration.

Please see below a sample declaration with jquery 1.11.2 referenced - hope it's of some use, you should find a similar declaration structure in all widgets.