this seems pretty simple, but I'm pretty new to web development, so I'm a little stuck here. I have a MongoDB running on a backend that contains geospatial features that should be displayed on the map in front. The connection between the backend and the web interface is where I have knowledge gaps.
The user should be able to scale in the area on the map of interest to him, and then click "Search". Then the backend will find each entry in the database, which has the coordinates that are on the current screen of users. It will pass them to the interface, ideally as a list of JSON objects. The interface displays them on a map.
I have an external interface, code that puts data in MongoDB and code that MongoDB requests. I know that I do not have a server that can be requested from the external interface. I thought I was using Jetty. But what do I need to do? I think I need Jetty to provide a JSON API that I can request from JavaScript. Can someone point me to the Jetty class or interface that I need to implement, and possibly give a few lines of code on how to request this from JavaScript?
source share