I'm building an application that stores locations with other data associated with those points. I'd like to be able to query an API which responds with a map with those points plotted out. (tangent) Eventually something like Leaflet will likely join the mix to explore those points dynamically.

Normally I'd use Google maps or Bing maps, but in this case we will be using custom maps so I'm leaning towards a hosting my own server to handle these requests. I'm leaning towards Geoserver or Mapserver. I'd prefer Geoserver but I don't seem to see any way to add points to a map I request, only the map itself. It seems like I could create points on a layer then add that, but then how do I create points/layers on the fly via the API...

Am I just missing something?

I'm open to suggestions if either of those two seem like a bad direction.

  • 1
    Do you want to add data or layers? For data, read about WFS – JGH Dec 7 '17 at 1:42

You have to have a point data source (shapefile or database for example) then if you want to show the points only and allow some querying of the point data then you should use a WMS; it's more efficient for large datasets, if you render the style on the server than if you send the raw data to the client (Leaflet) and apply some style rendering at that end.

In GeoServer, the default styling of a WMS is done using SLD, and in MapServer it's done through a a different mechanism. Both a GeoServer WMS and MapServer WMS will allow the default style to be changed by supplying an external SLD style through your web application, the styling happens on the server.

If your API is changing the data source directly (that is, if not through Leaflet...), then every change in the data source will be reflected in the WMS (assuming you don't change the names of the fields/columns).

If you want the user to have the ability to change the point data through Leaflet, then you will need to configure a WFS-T service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.