I slightly adjusted your provided code to make it work with Google Map.
Its working on the PC but on an Android Mobile, I can't do anything with map, neither zooming, nor refining the cursor position. And obviously nothing is saved into the database.