Hi, the problem is that the example is set to call the initialize function on window load. However, in Vaadin when the javascript you send from the server is executed the window has already loaded, so the function is never invoked. The solution is simple, just create the map object directly:
You can also check what your Javascript connector is doing in Firebug, Google developer console, etc. in the source/Javascript/whatever it is called tab. There you should also be able to set Breakpoints and inspect variables.
That was a type from copypaste above.
I definitely do not want to rely on an addon. Addons are often discontinued, and I just need the basic ability to show the gmap.
Furhter, I also want to understand how it works, as I may integrate furhter map solutions like openstreetmap.
I’m sure it’s possible somehow, as @Johannes Dahlström already pointed out how the JS code would work when executing it from the server side.
Sure it is possible - just wanted to make sure that you are aware of the add-on. Just try the inspector in your browser as Marius suggested and see where things go wrong. Working with the breakpoints should be really sraightforward in case of pure javascript components like this.