Add time dimension capabilities on a Leaflet map.

Overview

Leaflet TimeDimension

Add time dimension capabilities on a Leaflet map.

screenshot

Examples and basic usage

Checkout the Leaflet TimeDimension Demos.

Basic usage:

<html>
    <head>
        <title>Leaflet TimeDimension Demo</title>
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css" />
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.timedimension.control.min.css" />
    </head>
    <body>
        <div id="map" style="height: 100%; width: 100%"></div>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/iso8601.min.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.timedimension.min.js"></script>
        <script type="text/javascript" src="example.js"></script>
    </body>
</html>
// example.js
var map = L.map('map', {
    zoom: 10,
    center: [38.705, 1.15],
    timeDimension: true,
    timeDimensionOptions: {
        timeInterval: "2014-09-30/2014-10-30",
        period: "PT1H"
    },
    timeDimensionControl: true,
});

var wmsUrl = "https://thredds.socib.es/thredds/wms/observational/hf_radar/hf_radar_ibiza-scb_codarssproc001_aggregation/dep0001_hf-radar-ibiza_scb-codarssproc001_L1_agg.nc"
var wmsLayer = L.tileLayer.wms(wmsUrl, {
    layers: 'sea_water_velocity',
    format: 'image/png',
    transparent: true,
    attribution: 'SOCIB HF RADAR | sea_water_velocity'
});

// Create and add a TimeDimension Layer to the map
var tdWmsLayer = L.timeDimension.layer.wms(wmsLayer);
tdWmsLayer.addTo(map);

For more control over each object creation, you can create timeDimension objects manually, see Example 9

API

L.Map

This plugin will attach to a Map a TimeDimension object and a related TimeDimension Control if timeDimension and timeDimensionControl options are included.

Option Type Default Description
timeDimension Boolean false Automatically creates a new TimeDimension object linked to the map if set to true.
timeDimensionOptions Object {} Options for the TimeDimension object.
timeDimensionControl Boolean false Automatically adds a TimeDimension Control to the map if set to true.
timeDimensionControlOptions Object {} Options for the TimeDimension Control object.

L.TimeDimension

TimeDimension object manages the time component of a layer. It can be shared among different layers and it can be added to a map, and become the default timedimension component for any layer added to the map.

In order to include a TimeDimension in the map, add timeDimension: true as an option when creating the map.

Usage example

L.timeDimension().addTo(map);

Creation

Factory Description
L.timeDimension(<Object> options?)

Options

This options can be set up when creating the map with the option timeDimensionOptions.

Option Type Default Description
times Number null It can be: a) An array of times (in milliseconds). b) String of dates separated by commas. c) String formed by start date/end date/period. If null, it will be constructed according to timeInterval and period
timeInterval String "P1M/" + today String to construct the first available time and the last available time. Format: ISO8601 Time inverval
period String "P1D" Used to construct the array of available times starting from the first available time. Format: ISO8601 Duration
validTimeRange String undefined Filter the array of available times by start hour and end hour (for any date). Format "HH:MM/HH:MM".
currentTime Number Closest available time Current time to be loaded. Time in ms.
loadingTimeout Number 3000 Maximum time in milliseconds that the component will wait to apply a new time if synced layers are not ready
lowerLimitTime Number undefined
upperLimitTime Number undefined

Events

Event Data Description
timeloading time Fired when a new time is required to load
timeload time Fired when a all synced layers have been loaded/prepared for a new time (or timeout)
availabletimeschanged availableTimes, currentTime Fired when the list of available times have been updated
limitschanged lowerLimit, upperLimit Fired when range limits changed. Limits are expressed in index value

Methods

Method Returns Description
getAvailableTimes() Array of times Array of all the available times of the TimeDimension
getCurrentTime() time Current time of the Time Dimension
setCurrentTime(<Number> time) - Modify the current time. If the time argument is not among the available times, the previous closest time will be selected
nextTime(<Number> numSteps, <Boolean> loop) - Move the current time n steps forward in the available times array
previousTime(<Number> numSteps, <Boolean> loop) - Move the current time n steps backward in the available times array
prepareNextTimes(<Number> numSteps, <Number> howmany, <Boolean> loop) - Fire 'timeloading' for severals times (in order to pre-load layers)
registerSyncedLayer(<L.TimeDimension.Layer> layer) - TimeDimension will check if all layers are ready before firing timeload. It will listen to "timeload" event of these layers.
unregisterSyncedLayer(<L.TimeDimension.Layer> layer) -
setAvailableTimes(<Array> times, <String> mode) - Update available times of the TimeDimension with a new array of times (in ms). Mode : Update modes

L.TimeDimension.Layer

TimeDimension.Layer is an abstract Layer that can be managed/synchronized with a TimeDimension. The constructor recieves a layer (of any kind) and options.

Any children class should implement _onNewTimeLoading, isReady and _update functions to react to time changes.

Options

Option Type Default Description
timeDimension <L.TimeDimension> null TimeDimension object which will manage this layer. If it is not defined, the map TimeDimension will be attached when adding this layer to the map.
opacity Number 1
zIndex Number 1

Events

Event Data Description
timeload time Fires when a the layer has been loaded/prepared for a new time

L.TimeDimension.Layer.WMS

Implements a TimeDimension Layer for a given WMS layer, which can be a L.TileLayer.WMS or a L.NonTiledLayer.WMS.

This component synchronizes the WMS with a TimeDimension, modifying the time parameter in the WMS requests.

Usage example

L.timeDimension.layer.wms(layer).addTo(map);

Creation

Factory Description
L.timeDimension.layer.wms(<L.Layer> layer, <Object> options?)

Options

Option Type Default Description
cache Number 0
cacheBackward Number cache or 0 Number of layers that can be kept hidden on the map for previous times
cacheForward Number cache or 0 Number of layers that can be kept hidden on the map for future times
updateTimeDimension Boolean false Update the list of available times of the attached TimeDimension with the available times obtained by getCapabilities
updateTimeDimensionMode String "intersect" Operation to merge the available times of the TimeDimension and the layer (intersect, union, replace or extremes). See Update modes
requestTimeFromCapabilities Boolean false Get list of available times for this layer from getCapabilities
proxy String null URL of the proxy used to obtain getCapabilities responses from the WMS server avoiding cross site origin problems
getCapabilitiesParams Object {} Extra parameters needed to create getCapabilities request
getCapabilitiesUrl String null Alternative URL for the GetCapabilities request (useful if using a cache service like GeoWebCache)
getCapabilitiesLayerName String null Alternative layer name for the GetCapabilities request (useful if using a cache service like GeoWebCache)
setDefaultTime Boolean false If true, it will change the current time to the default time of the layer (according to getCapabilities)
period String null Duration between times that will be used to generate the available times of the layer from a time interval. It overwrites the value received in getCapabilities (if not null). Format: ISO8601 Duration
wmsVersion String layer.options.version or "1.1.1" WMS version of the layer. Used to construct the getCapabilities request

L.TimeDimension.Layer.GeoJSON

Manages a GeoJSON layer with a TimeDimension. According to GeoJSON specification, geometry coordinates can have only three dimensions: latitude, longitude and elevation. There isn't a standard way to add time dimension information. This plugin will search for some attributes inside properties:

  • coordTimes, times or linestringTimestamps: array of times that can be associated with a geometry (datestrings or ms). In the case of a LineString, it must have as many items as coordinates in the LineString. (Note: coordTimes is the name of the property recently included at Mapbox toGeoJSON library)
  • time: time of the feature

This component will create and show new GeoJSON layers which include only those features (or part of them) that are active for the time of the TimeDimension (according to a duration option). These new layers will inherit the baseLayer options. In the case of LineStrings, if addlastPoint option is enabled, a Point feature will be added with the property last (that can be used to customize the marker of this special Point).

Usage example

L.timeDimension.layer.geoJson(layer).addTo(map);

Creation

Factory Description
L.timeDimension.layer.geoJson(<L.Layer> layer, <Object> options?)

Options

Option Type Default Description
duration String null Period of time which the features will be shown on the map after their time has passed. If null, all previous times will be shown. Format: ISO8601 Duration
addlastPoint Boolean false Add a Point at the last valid coordinate of a LineString.
waitForReady Boolean false If true, it will wait until the baseLayer is loaded to mark itself as ready. You can use it with layers created using leaflet-omnivore.
updateTimeDimension Boolean false Update the list of available times of the attached TimeDimension with the available times of this GeoJSON
updateTimeDimensionMode String "extremes" Operation to merge the available times of the TimeDimension and the layer (intersect, union, replace or extremes)
updateCurrentTime Boolean updateTimeDimension Automatically change the current time of map to the first available time of the GeoJSON layer.

L.Control.TimeDimension

Leaflet control to manage a timeDimension. With play|pause, next, back, current time, time slider and speed slider controls.

Usage example

L.control.timeDimension().addTo(map);

Creation

Factory Description
L.control.timeDimension(<Object> options?)

Options

Option Type Default Description
timeDimension <L.TimeDimension> null
styleNS String "leaflet-control-timecontrol"
position String "bottomleft"
title String "Time Control"
backwardButton Boolean true Show backward button
forwardButton Boolean true Show forward button
playButton Boolean true Show play/pause button
playReverseButton Boolean false
loopButton Boolean false Show loop button to enable/disable loop animation
displayDate Boolean true Show display date control
timeSlider Boolean true Show time slider control
timeSliderDragUpdate Boolean false Update the map when dragging
limitSliders Boolean false Show limit knobs on the time slider to restrict animation range
limitMinimumRange Number 5 The minimum number of steps allowed in animation range
speedSlider Boolean true Show speed slider control
minSpeed Number 0.1 Minimum selectable value for speed slider in fps (1000/transitionTime)
maxSpeed Number 10 Maximum selectable value for speed slider in fps
speedStep Number 0.1 Speed slider step size
timeSteps Number 1 Number of time steps applied to the TimeDimension (forwards or backwards) in a time change
autoPlay Boolean false Animate the map automatically
player <L.TimeDimension.Player> undefined Attach an existing player to that control
playerOptions Object {transitionTime: 1000} Options for the TimeDimension Player object attached.(Cannot be used with player option)
timeZones Array of strings ["UTC", "Local"] Clicking on the date cycles between these

L.TimeDimension.Player

Component to animate a map with a TimeDimension, changing the time periodically.

Usage example

var player = new L.TimeDimension.Player({}, timeDimension).addTo(map);

Creation

Factory Description
L.TimeDimension.Player(<Object> options?, <L.TimeDimension> timeDimension)

Options

Option Type Default Description
transitionTime Number 1000 Milliseconds that the player will wait to check and launch the next time in the TimeDimension
buffer Number 5 (Number or Function) Number of times forward that will be requested in each iteration. Function callback will be called with 3 parameters (transitionTime, minBufferReady, loop)
minBufferReady Number 1 If this option is greater than 0, the player will full the buffer every time the number of next ready times (next layers ready) is below this number.
loop Boolean false Loop the animation when it reaches the last available time
startOver Boolean false When the player is at the last position, it start over to the beginning when the user press play

Events

List of events triggered by the player. Register with .on()

Event Data Description
play - When the animation is started/unpaused
running - When the animation is resuming after a waiting state
stop - When the animation is stopped/paused
waiting buffer, available When the animation is waiting for some layers to be loaded
animationfinished - When the animation has reached the end of the timeline (loop is disabled)
loopchange loop When the loop setting is changed
speedchange transitionTime, buffer When the transitionTime setting is changed

Methods

Method Returns Description
start(<Number> numSteps) - Start animation
stop() - Stop active animation
pause() - Pause active animation
release() - Resume animation paused
getTransitionTime() <Number> Return the time interval between two animation steps (in milliseconds)
setTransitionTime(<Number> transitionTime) - Change the time interval between two animation steps
isLooped() <Boolean> Return the loop state
setLooped(<Boolean> looped) - Activate/Desactivate the loop state

TimeDimension update modes

Update mode can be one of these values: intersect, union, replace, extremes.

  • replace It replaces available times with only the new ones (from layer or setAvailableTimes).
  • union It adds new times and merge them to existing ones.
  • intersect It keeps only the time shared in both existing and new ones.
  • extremes It can recompute periodic times according to options.period and extreme values of the set.

Requisites

Talks

Bugs, issues and contributions

Contributions and criticisms are welcome.

If you have any doubt or problem, please fill an issue!

If you fix something or want to add some contribution, many thanks in advance!

Comments
  • Style layer

    Style layer

    Hi, In example 6, the layer is smoothing (areafill style) Example 1: contour lines I have found that there are other filters for ncWMS. How I can install these filters in Thredds? Only exist in the file ImageProducer.java "BOXFILL, VECTOR, CONTOUR, BARB, STUMPVEC, TRIVEC, LINEVEC, FANCYVEC, PRETTYVEC" Thanks

    opened by darkat 15
  • Customizing the marker

    Customizing the marker

    How can I change the marker of the 'current position' without overwriting the marker-icon.png :) ?

    BTW: I'm speaking of the addlastPoint: true option

    Somehow one needs to replace this with e.g. a custom marker:

    var marker = L.marker([lat, lon]);
    var icon = L.icon({
        iconUrl: './path-to-im/test.png',            
        iconSize: [24, 24],
        iconAnchor: [10, 10]
    });
    marker.setIcon(icon);
    marker.addTo(vrpMap);
    
    opened by karussell 14
  • Automatically fetch WMS images and disable caching

    Automatically fetch WMS images and disable caching

    I was wondering if anything in the TimeDimension API will allow an automatic refresh of WMS images. I have a radar loop using the NOAA nowCOAST WMS reflectivity images. The loop loads in an hour's worth of images great. The problem is that they do not update as new images are available from the WMS service. I was hoping the "cache" or "cacheForward" options would help. Will either of these do the trick or there another API option that would work? If not, what would you suggest? Thanks in advance.

    Mike

    opened by talldude69 13
  • npm package ?

    npm package ?

    Hello again,

    I'm using npm to instantiate my projects, and not bower.

    There isn't any npm package published yet, I think it could be nice.

    But, with npm, we can install a package directly from his github URL, for example

    npm install socib/Leaflet.TimeDimension#d579118
    

    I encounter some errors :

    npm ERR! Linux 4.4.0-47-generic
    npm ERR! argv "/home/mdartic/.nvm/versions/node/v4.4.7/bin/node" "/home/mdartic/.nvm/versions/node/v4.4.7/bin/npm" "install" "socib/Leaflet.TimeDimension#d579118"
    npm ERR! node v4.4.7
    npm ERR! npm  v2.15.8
    npm ERR! code E404
    
    npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/iso8601-js-period
    npm ERR! 404 
    npm ERR! 404 'iso8601-js-period' is not in the npm registry.
    npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
    npm ERR! 404 It was specified as a dependency of 'leaflet-timedimension'
    npm ERR! 404 
    npm ERR! 404 Note that you can also install from a
    npm ERR! 404 tarball, folder, http url, or git url.
    

    This is due to the iso8601-js-period that is not declared into npmjs registry.

    Several questions :

    • what do you think about publishing this plugin in npm ?
    • do you agree i make a PR to update package.json and add iso8601-js-period in dependency ?
    opened by mdartic 11
  • Extending not replacing the _update method

    Extending not replacing the _update method

    Hey, I've got another question regarding your plugin. I would like to extend the L.Control.TimeDimension._update method, without touching your library. I thought about doing it like this: https://gist.github.com/trillerpfeife/f1c29c8c958b6be221289c6c069d7796 but this way is somehow not working. Do you have any idea?

    Have a nice day :sunny:, trillerpfeife

    opened by trillerpfeife 10
  • overlay animated path+points layer

    overlay animated path+points layer

    Hi would it be possible to make example9 work with a GEOjson file? This is because usually, other than the animated path (polyline, loaded from gpx or kml), it would be useful to show a overlay layer with the single points (each one with popup enabled to show date,location and fix number)...and it seems possible only with geoJson (or not?). I'm thinking to convert my gpx file in a geoJson (like attached, adding datetime values..) and then use:

    var jsonLayer = L.geoJson(null, { onEachFeature: function (feature, layer) {layer.bindPopup(feature.properties.Luogo);} }); $.getJSON("data/tr.geojson", function(json) { jsonLayer.addData(json); }); .. and then

    var overlayMaps = { "GPX Layer": gpxTimeLayer, "pt": jsonLayer };

    ...but then i'll have 2 similar file with coords in my projects...and is not a good solution. All gps data should be in a single file, that serve both animated path overlay and single points layer (usr can choose if enable both or each one) Another solution would be to find a way to extract single points from the gpx file you use and base my extra overlay layer on this...but is it possible? tr.zip

    opened by tecnocoma75 10
  • Loading GeoJSON step by step

    Loading GeoJSON step by step

    Hi @bielfrontera, you can at the time, load the various steps of a GeoJSON, as with a WMS layer?

    I'll explain: I have a GeoJSON that contains a lot of data (tens of MB). You can load a file (eg index.json) containing an array of dates (eg ["20151202T220000Z","20151202T230000Z"]), and then load the various GeoJSON necessary (eg 20151202T220000Z.geojson, 20151202T230000Z.geojson, etc.)?

    opened by fox91 8
  • Any better way to handle time for linestring in geojson files?

    Any better way to handle time for linestring in geojson files?

    At the moment I figured out, we can add time as a property for point and polygons. Works great but for line strings we need to add times as many times as coordinates or else just the last point is displayed. This is cumbersome. Does anyone have a different approach?

    Point Sample

       "type":"FeatureCollection",
       "crs":{  
          "type":"name",
          "properties":{  
             "name":"urn:ogc:def:crs:OGC:1.3:CRS84"
          }
       },
       "features":[  
          {  
             "type":"Feature",
             "properties":{  
                "ID":1,
                "Category":null,
                "Type":"Test",
                "Date":"20180101000000",
                "time":"2015-03-08T00:00:00.000Z"
             }
          }
       ]
    }
    

    Linestring Sample

       "type":"FeatureCollection",
       "crs":{  
          "type":"name",
          "properties":{  
             "name":"urn:ogc:def:crs:OGC:1.3:CRS84"
          }
       },
       "features":[  
          {  
             "type":"Feature",
             "properties":{  
                "ID":1,
                "Category":null,
                "Type":"Bike",
                "Date":"20181201000000",
                "time":"2017-09-08T00:00:00.000Z",
                "times":[  
                   "2017-03-08T00:00:00.000Z",
                   "2018-03-08T00:00:00.000Z",
                   "2019-03-08T00:00:00.000Z",
                   "2020-03-08T00:00:00.000Z",
                   "2021-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2019-03-08T00:00:00.000Z",
                   "2020-03-08T00:00:00.000Z",
                   "2020-04-08T00:00:00.000Z",
                   "2020-06-08T00:00:00.000Z",
                   "2022-9-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z",
                   "2022-03-08T00:00:00.000Z"
                ]
             },
             "geometry":{  
                "type":"LineString",
                "coordinates":[  
                   [  
                      144.66611709854402,
                      -37.900577963091273
                   ],
                   [  
                      144.66602796949803,
                      -37.900442408518742
                   ],
                   [  
                      144.66590379717303,
                      -37.900365586305668
                   ],
                   [  
                      144.66576112853602,
                      -37.900303624206259
                   ],
                   [  
                      144.66554465611304,
                      -37.900240128116373
                   ],
                   [  
                      144.66534036753902,
                      -37.900183918893688
                   ],
                   [  
                      144.66518118427402,
                      -37.90013647945878
                   ],
                   [  
                      144.66505050724803,
                      -37.900103552184376
                   ],
                   [  
                      144.66491364621902,
                      -37.900062765214692
                   ],
                   [  
                      144.66482396021803,
                      -37.900032461346385
                   ],
                   [  
                      144.66469208573804,
                      -37.8999824054616
                   ],
                   [  
                      144.66459597229104,
                      -37.899951376409859
                   ],
                   [  
                      144.66444721577102,
                      -37.89989803638057
                   ],
                   [  
                      144.66430606349104,
                      -37.899865072139342
                   ],
                   [  
                      144.66412351145203,
                      -37.89982319766478
                   ],
                   [  
                      144.66386013259702,
                      -37.89946918323816
                   ],
                   [  
                      144.66362211228403,
                      -37.899210914901786
                   ],
                   [  
                      144.66348071296702,
                      -37.89899193259587
                   ],
                   [  
                      144.66323273213405,
                      -37.898545654643044
                   ]
                ]
             }
          }
       ]
    }
    
    opened by rainitesh 7
  • add timedimension

    add timedimension

    i have several issues with the plugin

    1. i do have a wms service with time dimension enabled, but the control shows "no time available"

    2. when i set some options i got javascript-error "ReferenceError: nezasa is not defined

    if (nezasa === undefined) {"

    my javascript code:

        var mapOptions = {
            center: L.latLng(52.022501, 4.438992),
            zoom: 12,
            timeDimension: true,
            timeDimensionControl: true,
            timeDimensionOptions: {
                timeInterval: "2015-04-29/2015-05-01"
                }
        };
    var map = L.map('map', mapOptions);
    
    var tileLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
        attribution: '© OpenStreetMap contributors'
    }).addTo(map);
    
    var mywms = L.tileLayer.wms("http://localhost:8080/geoserver/Mannus/wms", {
        layers: 'Mannus:meetdata',
        format: 'image/png',
        transparent: true
    });
    map.addLayer(mywms);
    
    var testTimeLayer = L.timeDimension.layer.wms(mywms);
    testTimeLayer.addTo(map);
    
    opened by deRightDirection 7
  • Render polygons behind points and lines

    Render polygons behind points and lines

    I am trying to use leaflet method bringToBack( ) for polygons in order to place them behind points and lines.

    It does work in the first instance of time but overtime the polygon features with future dates overlap on top of points and lines. Is this because we are adding the features on map based on time and not as one complete layer? I did look into layer.geojson.js to check if there a way to handle this but couldn't find much info atm.

    Any help is appreciated.

    opened by rainitesh 6
  • Feature/new player

    Feature/new player

    This is a new implementation of the player. No jqueryUI dependencies , works on mobiles.

    • Added possibility to change animation limits with new knobs limitSliders=true
    • Now the player emits animation related events (play, pause, loop,...), timedimension emits events related to time loading/changing. This allows to create custom control

    As this is breaking change I changed version to 1.0.0-beta. I also updated examples pages to use the latest 0.7.7 version.

    Tested on 0.7.7 and 1.0.0b

    opened by r1m 6
  • vertical (elevation) dimension and controls

    vertical (elevation) dimension and controls

    I really appreciate this Leaflet plugin to offer time dimension controls. Congratulations. I am wondering if there is a similar code to control the vertical dimension ?

    opened by PBrockmann 0
  • Does the plugin support a list of times (vs a range)?

    Does the plugin support a list of times (vs a range)?

    I'm trying to get the plugin work for a small project of mine. I download satellite images of my area and run them through some processing. I would like to display them through Leaflet. I have set up a MapServer instance and it works in QGIS but I can't get it to work in Leaflet. Becaause the images are in irregular intervals, my server gives a list of available times rather than a range - like this: <Dimension name="time" units="ISO8601" default="2022-11-15T15:57:30Z" nearestValue="0">2022-10-22T04:42:09Z,2022-10-22T15:57:31Z,2022-10-27T04:50:17Z,2022-11-03T04:42:09Z,2022-11-03T15:57:30Z,2022-11-08T04:50:16Z,2022-11-15T15:57:30Z</Dimension>

    My leaflet code looks like this:

    var map = L.map('map', {
        zoom: 12,
        center: [61.2712,24.0333],
        timeDimension: true,
        timeDimensionControl: true,
    });
    
    var baseLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
        attribution: '© OpenStreetMap contributors'
    }).addTo(map);
    
    var satLayer = L.tileLayer.wms("https://mapserver.gofferje.net/?map=sat", {
        tileSize: 1024,
        layers: 'Sentinel-1-VVVH-ratio',
        format: 'image/png',
        transparent: true,
        attribution: 'VLK radar'
    });
    
    var tsatLayer = L.timeDimension.layer.wms(satLayer, {
        requestTimeFromCapabilities: true,
        updateTimeDimension: true,
    //    updateTimeDimensionMode: "replace",
    //    setDefaultTime: true,
        //wmsVersion: "1.3.0"
    });
    tsatLayer.addTo(map);
    var marker = L.marker([61.2712,24.0333]).addTo(map);
    

    I have tried setting the time dimension extent in the map section but to no avail. I just can't make it work.

    opened by sgofferj 0
  • stuck at example 12 heatmap

    stuck at example 12 heatmap

    Hi I have a simple geojson file like that:

      "type": "FeatureCollection",
      "metadata": {
        "total": 2073,
        "name": "BEAL",
        "event": "birth"
      },
      "features": [
        {
          "type": "Feature",
          "properties": {
            "time": "1920-03-15"
          },
          "geometry": {
            "type": "Point",
            "coordinates": [
              4.866667,
              45.516667
            ]
          }
        },
        {
          "type": "Feature",
          "properties": {
            "time": "1941-06-14"
          },
          "geometry": {
            "type": "Point",
            "coordinates": [
              3.683333,
              45.616667
            ]
          }
        },
        {
          "type": "Feature",
          "properties": {
            "time": "1949-07-16"
          },
          "geometry": {
            "type": "Point",
            "coordinates": [
              4.866667,
              45.516667
            ]
          }
        },
    

    And I want to use it as a heatmap like the example 12 but it's too complicate with the SODA API thing.

    Is there somewhere an simple example of a dynamic heatmap based on a single geojson file?

    Thanks

    opened by 2803media 0
  • Using the limitSliders to only show specific time interval of whole GeoJSON

    Using the limitSliders to only show specific time interval of whole GeoJSON

    Hello and first of all thanks for this great plugin, I have been using it for a few years without issues. However, I came across an use case that requires a modification that I can't really wrap my head around to implementing.

    Basically, I need to limit, by user input, how "early" information should start showing up on the viewer page from a GeoJSON file that already has a whole day's track info in it.

    1

    The closest I could get to my goal was enabling the limitSliders. However, it is my understanding that this is not how this function is supposed to be used - they only control the animated range that is played. Dragging the start limit slider makes the animation start from that state, with all the prior markers already shown and that makes sense for the original intended use.

    2

    Is there a way to make this feature behave as I described or could anyone kindly point me to the file / code section that governs the limit sliders and "point/track progress" selection/filtering so that I can attempt to implement the change myself?

    Thank you very much in advance!

    opened by BodoMinea 1
  • Documentation in code functions

    Documentation in code functions

    I'm using this plugin on my work and I realized that this code doesn't have a documentation for it's functions. So I decided to help with that.

    There are 7 commits, each one for a single file, so it beacame more easy to track the changes across the files.

    I know some documentations have a lack of clarity but I'll improve them across the time.

    In the end I hope I can help to update and improve your package. See ya.

    opened by PedroDrim 0
  • start date and end date is not work with geojson data

    start date and end date is not work with geojson data

    I read README and I used the form "String formed by start date/end date/period " But It isn't work! How do I make the features have their own period? (Ex. One feature show up at 2015-08-01 and hide at 2016-08-02, and another feature show up and hide not the same period! )

    My code :

    { "id": "0", "type": "Feature", "properties": { "nuts_id": "ES", "levl_code": 0, "cntr_code": "ES", "nuts_name": "ESPAÑA", "fid": "ES", "name": "ESPAÑA", "value": 279.1763000488281, "times": "2015-08-01/2016-08-02/P1D" //--->Not Work! },

    opened by heeya832 2
Releases(v1.1.1)
Owner
SOCIB public code
Balearic Island Coastal Observing and forecasting System
SOCIB public code
A modern study React component of leaflet draw for react-leaflet

React Leaflet Draft A modern study React component of leaflet draw for react-leaflet React component of leaflet-draw for react-leaflet Table of conten

Giovane Santos Silva 16 Oct 20, 2022
Simple location picker on Leaflet map

Leaflet Location Picker Simple location picker with Leaflet map Usage: <label>Insert a Geo Location <input id="geoloc" type="text" value="" /> </lab

Stefano Cudini 37 Nov 17, 2022
Mapbox JavaScript API, a Leaflet Plugin

mapbox.js A Mapbox plugin for Leaflet, a lightweight JavaScript library for traditional raster maps. For the state-of-the-art Mapbox vector maps libra

Mapbox 1.9k Dec 23, 2022
This is the leaflet plugin for GeoServer. Using this plugin user can have access to wms and wfs request easily.

Documentation leaflet-geoserver-request This is the plugin for Geoserver various kind of requests. Using this plugin, we can make WMS, WFS, getLegendG

Tek Kshetri 127 Dec 15, 2022
React components for Leaflet maps

React Leaflet React components for Leaflet maps. Documentation Getting started API reference Changes See the CHANGELOG file. Contributing See the CONT

Paul Le Cam 4.4k Jan 3, 2023
Vue 2 components for Leaflet maps

Vue2Leaflet Vue2Leaflet is a JavaScript library for the Vue framework that wraps Leaflet making it easy to create reactive maps. How to install npm in

Vue Leaflet 1.9k Dec 29, 2022
AngularJS directive to embed an interact with maps managed by Leaflet library

Angular Leaflet Why the fork? While we are grateful for all the original work at tombatossals/angular-leaflet-directive. We need to be able to operate

AngularUI 313 Nov 10, 2022
A map tool with real-time collaboration 🗺️

Mapus Maps with real-time collaboration ??️ Mapus is a tool to explore and annotate collaboratively on a map. You can draw, add markers, lines, areas,

Alyssa X 3k Jan 4, 2023
jQuery Vector Map Library

This project is a heavily modified version of jVectorMap as it was in April of 2012. I chose to start fresh rather than fork their project as my inten

10 Best Design 1.8k Dec 28, 2022
jQuery Vector Map Library

This project is a heavily modified version of jVectorMap as it was in April of 2012. I chose to start fresh rather than fork their project as my inten

10 Best Design 1.8k Dec 28, 2022
JavaScript WebGL 3D map rendering engine

VTS Browser JS is a powerful JavaScript 3D map rendering engine with a very small footprint (about 163 kB of gziped JS code). It provides almost all f

Melown Technologies, SE 203 Dec 7, 2022
Mapbox Visual for Power BI - High performance, custom map visuals for Power BI dashboards

Mapbox Visual for Microsoft Power BI Make sense of your big & dynamic location data with the Mapbox Visual for Power BI. Quickly design high-performan

Mapbox 121 Nov 22, 2022
A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling

Windshaft A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling. Can render arbitrary SQL queries Generates image and UTFGrid in

CARTO 306 Dec 22, 2022
Serverless raster and vector map tile generation using Mapnik and AWS Lambda

tilegarden ??️ ?? Contents About Usage Deployment to AWS Additional Configuration Options Required AWS Permissions Features Configuration Selection an

Azavea 89 Dec 22, 2022
Lightweight Node.js isochrone map server

Galton Lightweight Node.js isochrone server. Build isochrones using OSRM, Turf and concaveman. Francis Galton is the author of the first known isochro

Urbica 266 Dec 17, 2022
A pluggable Node.js map tile server.

TileStrata TileStrata is a pluggable "slippy map" tile server that emphasizes code-as-configuration. The primary goal is painless extendability. It's

Natural Atlas 409 Dec 30, 2022
3D web map rendering engine written in TypeScript using three.js

3D web map rendering engine written in TypeScript using three.js

HERE Technologies 1.2k Dec 30, 2022
Mind elixir is a free open source mind map core.

Mind-elixir is a framework agnostic mind map core

DJJo 1.4k Jan 2, 2023
Fast Map built for keys that are always fixed size uniformly distributed buffers.

turbo-hash-map Fast Map built for keys that are always fixed size uniformly distributed buffers. npm install turbo-hash-map Uses a prefix trie to map

Mathias Buus 39 Jun 20, 2022