Comments (3)
@mattbeets im trying to make something similar you did.
the diference is that i have the same GeoJSON data shown in different layers on my map with a radio button control: points as circleMarker, points as a heatMap and points as a clusterGroup.
I'm trying to add a timeline with these layer control groups.
I have the layergroup working fine and i managed to make the timeline work adding it directly to the map like in the examples:
timelineControl.addTo(map)
timelineControl.addTimelines(myTimeLine)
myTimeLine.addTo(map)
But when i try to add it to a layer so i can toggle using groupedLayer i'm getting similar errors
from leaflet.timeline.
@mattbeets i managed to solve it by adding the timeline to a LayerGroup. Notice that the diferent syntax is because im using vue-cli3.
pointsTimeLineLayer = L.layerGroup()
timeLineClusters = L.layerGroup()
timelineHeatLayer = L.layerGroup()
let baseLayers = {
"Tile layer": tileLayer,
"Grayscale": grayscale,
"Streets": streets
}
let overlays = {
"Timeline layers":{
"points": pointsTimeLineLayer,
"Clusters" : timeLineClusters,
"HeatMap": timelineHeatLayer,
}
}
L.control.groupedLayers(baseLayers, overlays).addTo(vm.map)
let myTimeLine = L.timeline(geoJSONData,
{
pointToLayer: bookmarkMarkerOptions, // bookmarkMarkerOptions is a function
onEachFeature: addBookmarkPopUp, // addBookmarkPopUp is a function
getInterval: getInterval // getInterval is a function
}
)
myTimeLine.addTo(pointsTimeLineLayer)
timelineControl.addTo(map)
timelineControl.addTimelines(myTimeLine)
i Hope this solves your issue
from leaflet.timeline.
Thank you so much, Marcelo.
Great work. I'll try it as soon as possible :)
from leaflet.timeline.
Related Issues (20)
- Version 10 of node.js has been released
- historical dates HOT 4
- Sync Control doesn't actually sync the expected control HOT 1
- Uncaught RangeError: Maximum call stack size exceeded HOT 6
- Automatic interval for seamless mode HOT 1
- Issue with Playback-Function on point-Timeline HOT 3
- Slider and Timeline-Points dont show up mobile on iOS HOT 2
- Curved polylines
- Using Leaflet.timeline on touch devices HOT 3
- Getting the current timestamp HOT 3
- How to remove timeline from existing timelineSliderControl
- How to use setTime function HOT 2
- How to load plain geojson HOT 2
- Error and breaks Rails ActionText HOT 2
- Examples not working HOT 1
- Display of current date and list sorting HOT 2
- Is it possible to use with heatmap HOT 2
- This plugin seems not compatible to the latest leafletJS HOT 1
- Do you think if it's possible to use this timeline plugin in a Vue Project?
- New npm package with latest code HOT 2
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.timeline.