Leaflet - Popup layers in same location - leaflet

I have a map with the layer control layer, where each option is a bus line. If I mark two lines, and both pass in the same location, I can only get the information from the layer above, in the onEachFeature event. How do I show in a popup the information for all layers that are below the selected one? Thanks

Related

Start map without layer displayed when using layercontrol

I have many overlays in Layercontrol. When I start the map the display is very confused, because all layers are displayed.
Is it possible to start the map so that no layer is displayed?
Leaflet will display all the layers that you add to the map. For base layers, you want to add one layer (which will be your default) and not the others. For overlay layers, it's up to you how many (or none) you add to the map for the default state. In both cases, the L.control.layers will configure itself to match the state of the layers when you add the control.

How to centralize and change the center of the leaflet map dynamically

I have a map that covers the entire screen and I have a layer that overlays the map. That layer goes from bottom to top.
the user interacts with this layer by clicking on different options and these options draw markers on the map.
When I centralize the map, the markers are hidden behind the layer that superimposes the map, thus eliminating the visibility of the marker.
How could I centralize the map and then move it one third above the layer?
This question is a remake of
How can I change the location center of a map using Leaflet API?
Try doing it this way
var offset = map.getSize().y * 0.15;
map.panBy(new L.Point(0, -offset), {animate: false});
But every time I click on an option in the layer to create a marker, the map moves and I lose the center.
jsfiddle
Excuse the example image
The idea is that after the map makes the setView place its center above the blue layer that superimposes the map so as not to hide the markers.

Is it possible to make a Bing Maps TileLayer clickable?

There are Data Layer Events with which you can add e.g. click events to the Layer Class. How can I add event handlers to the TileLayer Class?
In the WMS Tile Layer Example I wish I could add the following lines of code:
Microsoft.Maps.Events.addHandler(NOAAWeatherRadar, 'click', function() {
// add infobox
});
Is this realizable or do you know of a workaround?
Tile layers do not have mouse events in any map control. Tile layers cover the complete surface of the map. If you want a mouse event simply add an event to the map itself. If you want to be able to detect a mouse event on a shape drawn in the tile layer, then you will need to do some server side processing to test for intersection against the raw data.

Mapbox gl repeat marker

I try to repeat a marker at the same coordinates when I am moving the map to infinity, in the same way that layers.
example : https://www.mapbox.com/mapbox-gl-js/example/geojson-polygon/
Has anyone found how to do that please?
If it's not possible, conversely is it possible to not repeat layers when you moving the map ?
Thank you
The Link example you provided is not using Markers to render the shaded area. It is using a feature, in this case a polygon, included in a layer (a layer can have many features).
In MapBox the rendered map is made up of any number of layers (including the tile data) which is rendered whenever you scroll or drag to a particular area of the map. For example as you keep dragging to the right in the map it will just keep rendering in the relevant layers and tiles.
The Marker functionality has a different purpose which is as a one off selected point which is useful for a user click or hover interaction.

How to differentiate markers in Leaflet

I am working on Openstreet map. I have displayed markers in leaflet, but I want to design an interface and assign different groups to the markers. E.g. when an user clicks on "Hospitals", all the hospitals should be displayed on the map.
You should study this tutorial.
What you can do is group all your marker in the same category in a L.LayerGroup,
then the user will be able to add or remove it at will with the control.