I am developing an application that uses GeoServer + Leaflet + PostGIS. I created my database-based layers within GeoServer. As a basemap I am using OSM. When the maximum zoom occurs with the active layer, the style is losing completely, but remains under the map.

I also use the "Leaflet.Wms" plugin to access the GeoServer layers. Follows the code:

var NewSource = L.WMS.Source.extend({
'showFeatureInfo': function (latlng, info) {
    this._map.openPopup(info, latlng);
var wmsCorredores,

var s = new NewSource(url, {
    "format": 'image/png',
    "transparent": true,
    "version": '1.1.1',
    "attribution": '© PMSJC',
    "info_format": "text/html",
    "feature_count": 10

wmsMunicVizinhos = s.getLayer("geoSJC:vizinhos").addTo(map);
wmsLimites = s.getLayer("geoSJC:limites").addTo(map);
wmsPMSJC = s.getLayer("geoSJC:grupo_geoSJC").addTo(map);

After some tests I could conclude that when the zoom reaches level 19 the layer style is lost. The layer is still active, only the style is lost. The style applied to the layer is sent by GeoServer via WMS service.

I can't understand if the problem is setting the style inside GeoServer, or if I need to fix the application that consumes these layers. As I am still getting to know GeoServer, I would like to know if anyone has had this kind of problem.

  • 1
    Hi and welcome to GIS.SE! Could you please be a little more specific on your problem so that others can help you more easily? Thanks! – root676 Sep 19 '19 at 21:41
  • 1
    Please add a screenshot to show the problem – Ian Turton Sep 20 '19 at 6:45
  • I put the images in an attempt to better explain my problem. If you need more information and / or codes let me know. Thanks people – Fernanda Sep 20 '19 at 11:21
  • Is it wms or wfs? – neogeomat Sep 20 '19 at 13:58
  • The layer is send by WMS. – Fernanda Sep 20 '19 at 18:07

Your Answer

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

Browse other questions tagged or ask your own question.