Google Maps

It seems the error is for loading the scripts in an unexpected order.
Whatever.
I have another question:
For testing the code I posted before, I have been using an editor and copying the code directly to the initial value field, however, for making this task more comfortable I would like to put the initial value like the file where I have the code. I’ve tried to do it with a document variable but then I get the error I posted some posts ago:
Failed to get the list form pages. (“Error al obtener la lista de páginas de formulario”, in Spanish)

The steps I make are:
1.- Create a document (pool level)
2.- “Link” it with the file where I have the code (I’ve copied it in …/workspace/default/attachments)
3.- Select the document in the initial value of the HTML Widget
4.- Boom!

Why is this hapennig? I have lost some step?

thanks in advance and regards.

EDIT: I’m trying to use another google service, in this case google charts, and I’m trying using the same structure I used to make the map work (using the $.getScript() before, and writing the code directly in the initial value field), but in this case the library is not loaded.
The code I’m using is working outside Bonita. The code and the errors are:
CODE:

ERRORS:
Uncaught ReferenceError: google is not defined
Uncaught TypeError: Cannot read property ‘DataTable’ of undefined

I don’t understand why the same method, is not working with a different library. Why could it be?