Comments (5)
Hi!
I've checked the GetCapabilities response of the WMS you are using. Layer '1' doesn't have a Extent[name="time"] element. But its parent yes (it seems to be a nested layers structure).
I've changed the code, and now it gets the available times from the layer or its parent.
Take into account that you would need to setup a proxy to make the request (example https://github.com/socib/Leaflet.TimeDimension/blob/master/examples/server/proxy.php).
I will add a page in this repository to collect Leaflet.TimeDimension examples of usage. Feel free to add your case.
from leaflet.timedimension.
Hi again,
So, I added your changes from commit 9ad9ab7 and I added a proxy call with the proxy.php script you politely provided:
eflowbeach/MobileWeather@36c9355
and I still get time=undefined here:
_newTimeIndexLoaded: function() {
if (this._loadingTimeIndex == -1) {
return;
}
var time = this._availableTimes[this._loadingTimeIndex]; // <----still available times is empty
Thank you for your help!
from leaflet.timedimension.
Hi,
I have uploaded a new example with this layer (see http://apps.socib.es/Leaflet.TimeDimension/examples/example14.html ).
There is a conflict between times setted in your timeDimensionOptions and the times retrieved from getCapabilities. With this configuration, the program does an intersection of both. And this intersection is null.
If you active updateTimeDimension option, after retrieving available times from the server, the timedimension component is update according to the updateTimeDimensionMode parameter. By default this mode is 'intersect', and you might want to change it to 'replace' (see https://github.com/socib/Leaflet.TimeDimension#-options-2 ).
I would recommend to not set timeInterval and period options, as you will see in the example 14. Therefore, the available times will be the ones retrieved from the server.
from leaflet.timedimension.
Thanks Biel! It is working now. 👍
So, since I removed the timeInterval and period options, is there a way to limit the amount of frames to say 1 hour worth of data (maybe the cache options do this?) ? If not, I could probably provide you with a pull request that does this.
Btw, this is a really cool library!
from leaflet.timedimension.
Thanks! :)
It might be useful to add maxTime and minTime optional parameters to the layer, and modify the list of times retrieved from the server (probably at setAvailableTimes
).
But you can filter the list with the default list of times. But this default list must match the times on the server.
NOAA's layer is composed by layers each 5 minutes. You need to make sure that you create the default list of times taking a date with minutes finishing in 0 or 5 (and 0 seconds).
var endDate = new Date();
endDate.setUTCSeconds(0, 0);
var minutes = endDate.getUTCMinutes();
endDate.setUTCMinutes(minutes - (minutes % 5));
[...]
timeDimensionOptions: {
timeInterval: "PT1H/" + endDate.toISOString(),
period: "PT5M", // or "PT10M"...
},
updateTimeDimensions option is still recommended to remove the last occurrence, if it is still not available on the server.
from leaflet.timedimension.
Related Issues (20)
- Property 'timeDimension' does not exist on type 'typeof control' HOT 11
- How can I turn off time dimension control on a layer inside L.Control.layers ?
- Time Control doesn't sync when switching layers HOT 1
- is it possible to change timeinterval after creating map object?
- i need to make time on multi feature linestring
- Is it possible to build the track for a linestring geojson with respect to time iterations?
- Are there any examples integrating with react-leaflet
- [accessibility] Use `<button>` or `<a role="button">`
- [accessibility] Slider/range controls HOT 3
- Feature/limitSliders Labels
- start date and end date is not work with geojson data HOT 2
- Keep circles when time pass HOT 2
- Where are the arrows being generated? HOT 4
- Using the limitSliders to only show specific time interval of whole GeoJSON HOT 1
- stuck at example 12 heatmap
- Does the plugin support a list of times (vs a range)?
- vertical (elevation) dimension and controls HOT 2
- Does a L.timeDimension.layer support click events?
- iso8601-js-period cdn gives 404 HOT 2
- this._timeDimension.getAvailableTimes is not a function
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.timedimension.