Comments (4)
You add listeners on each of them and handle them like normal.
I'm not sure what you mean by your second question, all grid layers should be in the same position?
from leaflet.utfgrid.
I have added listeners to both. But the layer below the other grid layer does not know if it is being moused. I find no evidence that all grid layers are the same position. Even if I am using mapboxes swipe layers example what I want to achieve is being a pain.
This is kind of a bad example since I am using 2 separate maps http://widash.visiontech360.com/console/broadband_slider_map but I would still like to be able to trigger the hover of one maps grid layer based on the others. That would allow for my mouse events to activate both sets of data. SO when I am hovering the top slider layer I would see grid data for both allowing for better comparing. After all that is what that ui is for.
from leaflet.utfgrid.
I guess I can try and add listeners to the top layer for every layer underneath. I will try this and let known if it works.
from leaflet.utfgrid.
To use it across 2 maps you'll need to do some dodgyness:
Listen for mouse events on both maps so you get latlng's.
Call the _objectForEvent method on your grid layer, passing your mouse event.
See: https://github.com/danzel/Leaflet.utfgrid/blob/master/src/leaflet.utfgrid.js#L122
You'll get the same object back that the events usually fire.
Hopefully this gets you there!
from leaflet.utfgrid.
Related Issues (20)
- Support touch devices HOT 1
- Support templates and custom templates
- Between-zoom support HOT 1
- Max Zoom 18? HOT 3
- setUrl method HOT 2
- get pixel coordinates for mouse events HOT 1
- Grid outside of layer boundaries. HOT 6
- Prevent to trigger click event on double-click HOT 1
- Precision
- utfgrid example mb-util HOT 3
- Mouseout only when leaving layer area HOT 4
- initialize function issue HOT 5
- sparse tile sets don't work
- Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node' HOT 5
- Internet Explorer - DOMException Invalid State HOT 2
- UTFGrid is not working when zoom level is non-integer (Leaflet 1.0) HOT 3
- Definition File HOT 2
- Layer is not added after zooming into min/max zoom range
- external service url
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.utfgrid.