Consume data from Geoserver preferably use WMS

21 Views Asked by At

I am working on an application that needs to display locations of boats. So far the data from these boats is in geojson and I have the following data to display the boats in my web application.

$.getJSON("data/boatoper.geojson", function (data) { boatopers.addData(data); map.addLayer(boatoperLayer); });

However the boat locations are dynamic and I need to feed the location of these boats from a PostgreSQL database connected to Geoserver. In other words i need the app to consume the data straight from Geoserver and I am having a hard time coming with the code that does exactly this

I have used geojson and it has worked using the code $.getJSON("data/boatoper.geojson", function (data) { boatopers.addData(data); map.addLayer(boatoperLayer); }); but I now want to use wms

0

There are 0 best solutions below