Using the code from this question I managed to successfully add a tileLayer of place/road labels above my overlay layer. However, this has had the unfortunate side-effect of blocking any clicks to the overlay layer below.
Broadly, how can I reenable detection of clicks to layers/objects below the top tileLayer?
See this example where I add a layer of labels to the top with:
var CartoDB_PositronOnlyLabels = {
"tilejson": "2.0.1",
"tiles":['http://c.basemaps.cartocdn.com/light_only_labels/{z}/{x}/{y}.png'],
"attribution": '© <a href="http://cartodb.com/attributions">CartoDB</a>',
"maxzoom": 19,
"minzoom": 13
};
var topPane = map._createPane('leaflet-top-pane', map.getPanes().mapPane);
var labelLayer = L.mapbox.tileLayer(CartoDB_PositronOnlyLabels).addTo(map);
topPane.appendChild(labelLayer.getContainer());
labelLayer.setZIndex(9);
Update Originally this was a problem because I am using a special draw function to draw in routes by clicking to add waypoints to the route. With the addition of the tileLayer, users can still add waypoints. But they can't drag waypoints to move the route, nor can they click on the last point to end the route.
I fixed this by setting the ZIndex of the label tileLayer to 5, so that it would be in-between the overlay layer (zIndex: 4) and the marker layer (zIndex:6). I would however still like to know if it's possible to have a clickable overlay layer under a tilelayer.