Comments (12)
Hi Kopleman,
I noticed the same issue. I check my code and noticed that the map pane than contains my geoJson layer zIndex property was set at 680. I lowered it to 250 and it works fine.
from leaflet-measure.
Doesnt work for me becouze all html elements(circles and plugin's svgs) lay in same div
from leaflet-measure.
When a measurement is started, a marker with z-index
of 1000 is placed on the map, and click events on that marker are used to add new points to the measurement. The z-index is set to ensure this marker is "above" all other elements. Is that not the case in your situation? Are other elements receiving the click event instead? What are their z-indexes?
from leaflet-measure.
At screen when the cursor over the red circle(L.Circle element) clicks are not registred.
The <svg>
and its <g>
dont have z-index
.
from leaflet-measure.
I'm having the same issue. I've used captureZIndex: 10000
, but vertices are still not created if I click on a feature. The pane
the feature is in has zIndex 602.
I'd really like to get a solution to this. I have used the a different Leaflet plugin for measurement in my qgis2web plugin. However, it has stopped working. I would like to switch to this plugin for Leaflet measurement functionality, but I hoped this issue was sorted.
Is there anything I can do to help try to fix this issue?
from leaflet-measure.
@Kopleman @tomchadwin Do you have an application demonstrating the issue that I can checkout? Or maybe recreate with a Plunker?
from leaflet-measure.
The general design if it helps troubleshoot.. When a measure is started, a marker 2X the size of the map is is added to the leaflet-marker-pane
at the captureZIndex
configured. The leaflet-marker-pane
is the topmost leaflet pane, above the leaflet-overlay-pane
containing vector layers, so there is typically no conflict.
Also, at what versions of Leaflet and leaflet-measure are you seeing this?
from leaflet-measure.
Leaflet 1.0.3
leaflet-measure 2.1.7
Are zIndices local to Leaflet panes? I am creating a pane for each layer, the panes have zIndex 600 + n, n being a simple count of the layers in the map. In my example page, my layers are in panes with zIndices 600-602.
I can try to create a Plunker or equivalent, but I am not writing the Leaflet code from scratch - qgis2web is exporting it. It's therefore likely to be a bit more complex than you would like for a minimal example.
from leaflet-measure.
OK, I see the issue now - the leaflet-marker-pane
has zIndex = 600
, so my map panes are higher. Let me see whether I am creating my new panes too high - I thought they were at an appropriate zIndex, but I probably misunderstood the Leaflet pane hierarchy.
from leaflet-measure.
Confirmed: if I drop my panes down to 400 + n, measure clicks don't reveal feature popups. Apologies for the noise. It would probably be worth adding some info about Leaflet panes into the docs (it might be there already - in which case, apologies).
Thanks for the help.
from leaflet-measure.
Update: I was a little confused, when I changed my panes' zIndices to 400-2 that, although it was working, the measure lines were appearing below these layers. Investigating showed that the measure lines were appearing in the leaflet-overlay-pane
, not the leaflet-marker-pane
. Since that has zIndex = 400
, we see the issue. Are you sure the measure lines are intended to appear in the pane?
Update - apologies again. It's your big transparent click-blocking rectangle which goes in the marker-pane, and the visible measurement lines etc go into the overlay-pane. Got it.
from leaflet-measure.
I'm working on a project and got the same issue with the measure tool. After read lots of threads of issues I fixed the problem changing z-index
of the leaflet-overlay-pane
class. Now it works fine in all browsers except IE... Don't know if it's the best solution though.
from leaflet-measure.
Related Issues (20)
- Listening for measurefinish event HOT 1
- Is it possible to disable the autocomplete?
- Apply a different coordinate system to Coordinate Output?
- Measure not visible on layers HOT 6
- green dotted line appearing
- Adding Perimeter value to the measurefinish results data
- Customizing map feature styles?
- Polyline don't show up when measure starts - Django
- Angular 2 is unable to compile sass due to relative paths to package assets HOT 2
- localization HOT 3
- Show Measure Popup onclick
- Allow to adjust the vertices
- Does not work in Leaflet 1.8.0 HOT 8
- How to start the measurement directly whiling clicking the toggle button?
- Property 'Measure' does not exist on type 'typeof control' in Angular CLI HOT 2
- Is this project still upkept? HOT 5
- typings for Angular 14
- after clicking on map it changes center of the map HOT 3
- bug HOT 1
- Doesn't work with image overlays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet-measure.