I have a project for plotting an electric field strength profile on a certain map. The Electric field strength is to be calculated based on user inputs- I have a java code for that. I need to get maps from Google servers and overlay my field strength profile on the map, so that zooming in/out interactions are possible. The trouble is how to interact JavaScript and the java Servlets?

Everytime a user changes the parameters, the server recalculates the field and stores them as a picture. Then immediately the JavaScript fetches that image and puts it on the Google Maps as overlay.
I need to know if this is technically possible to connect?