leafletgeoservergetfeatureinfo

customize the display of getFeatureInfo


I use the leaflet and the getfeatureInfo function to display the data of a wms layer belonging to the geoserver, I want to customize the display of retrieved table: I use this plugin https://gist.github.com/rclark/6908938.


Solution

  • If you have access to the GeoServer instance you can control the style and layout of the response to a getFeatureInfo request using templates.

    If you only have access to the endpoint then try requesting the response in application/json format and then use JavaScript to display the information in whatever format you like.