I intend to create a custom Geotools function that does some special insertions into a PostGIS DB.
My question is how to call that function from Openlayers?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Just a stab in the dark but... create an application stack that has geoserver and a programming language container application that uses geo json, a java script library and the like and use that to call and put to the hosted layer. The problem is your question is too broad and indicates you need to do some homemwork, as you don't grasp the complexity of the task you are undertaking. Then someone giving a line of script would be easy. A lyer is only the visual representation and not the coding that is needed on the backend application. Look up LAMP AMP stacks.