0

having the same problem as Leaflet layer tree plugin - order layers, i installed the solution but that does not work for me:

added zIndex:10 to the base layers

            code: "base",
            name: "Base Layers",
            active: true,
            selectedByDefault: false,
            openByDefault: true,
            childLayers: [
                {
                    code: "osm",
                    name: "OpenStreetMap.org",
                    active: true,
                    selectedByDefault: true,
                    openByDefault: true,
                    childLayers: [],
                    selectType: "NONE",
                    serviceType: "OSM",
                    params: {
                        url: osmOrgUrl,
                        attribution: osmTiles,
                        zIndex:10,
                        maxNativeZoom:19,
                        maxZoom:20
                    }
                },
                {
                    code: "osm_gray",
                    name: "OpenstreetMap.org gray",
                    active: true,
                    selectedByDefault: false,
                    openByDefault: true,
                    childLayers: [],
                    selectType: "NONE",
                    serviceType: "OSM_GRAY",
                    params: {
                        zIndex: 10
                    }
                }

...

and zIndex:10000 to the overlays

                        {
                           code: "fire_hydrants",
                           name: "Hydrants",
                           active: true,
                           selectedByDefault: false,
                           openByDefault: true,
                           childLayers: [],
                           selectType: "MULTIPLE",
                           serviceType: "WMS",
                           coordinateSystem: "EPSG:4326",
                           onPopup: function (layer) {
                               return buildContentFromLayer(layer);
                           },
                           params: {
                               request: "getMap",
                               service: "WMS",
                               layers:  "osm:Hydrants",
                               name: "Hydrants",
                               version: "1.1.0",
                               url: geosWMS,
                               format: "image/png8",
                               transparent: true,
                               zIndex: 10000,
                               maxFeatures: "1000"
                           },
                        },

...

but nothing changed :(

page is online: https://wambachers-osm.website/emergency/idx400.jsp

select Hydrants as overlay and then switch base layers.

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

0

"Solved" this problem by switching from Leaflet layer tree plugin to jstree.

  • It might help others if you could provide links to the plugins you reference, in case they have the same problem. :) – mike.bronner Dec 25 '18 at 3:49

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.