Skip to content

Commit

Permalink
Split code in no-leaflet and leaflet-versions for future separation
Browse files Browse the repository at this point in the history
New lists of methods to handle new data: updateLastObservationFuncList, updateObservationFuncList, and updateForecastFuncList

Extended the return result from Station.getVectorFormatParts to include parameter-ids and values
New method:
Station.datasetIsRealTime(dataSet): Return true if the timestamp of the dataset is not to old where "To old" is given by the observationGroup
Station.getPeriodStat(periodIndex, forecast): Get the stat for period from/to now to/from nsObservations.observationPeriods[periodIndex]/nsObservations.forecastPeriods[periodIndex]
Station.formatPeriodSta(periodIndex, forecast): Return a formated string with the stat from getPeriodStat

Metadata for Observation-group for current adjusted
  • Loading branch information
NielsHolt committed Apr 21, 2024
1 parent 9062d1a commit 7c81866
Show file tree
Hide file tree
Showing 11 changed files with 2,498 additions and 2,435 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fcoo-observations",
"version": "3.10.2",
"version": "3.11.0",
"homepage": "https://github.com/FCOO/fcoo-observations",
"authors": [
"Niels Holt"
Expand Down
390 changes: 283 additions & 107 deletions demo/bower_components.css

Large diffs are not rendered by default.

2,025 changes: 1,121 additions & 904 deletions demo/bower_components.js

Large diffs are not rendered by default.

16 changes: 3 additions & 13 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<script src="../src/station-1.js"></script>
<script src="../src/station-2-highcharts.js"></script>

<script src="../src/_fcoo-observations-leaflet.js"></script>

<!-- <script src="../src/leaflet-danskehavnelods.js"></script> -->
<script>
i18next.init();
i18next.changeLanguage('en');
Expand Down Expand Up @@ -155,6 +155,7 @@

maps[0].createPane('observations');
maps[1].createPane('observations');


fcooObservation = new window.fcoo.FCOOObservations({
fileName:[
Expand All @@ -169,23 +170,12 @@
}
});


var geoJSON0 = fcooObservation.geoJSON().addTo(maps[0]);
fcooObservation.show('SEALEVEL', maps[0]);

var geoJSON1 = fcooObservation.geoJSON().addTo(maps[1]);
fcooObservation.show('CURRENT', maps[1]);


/*
setTimeout(function(){
geoJSON1.remove();
}, 10000);
setTimeout(function(){
geoJSON1.addTo(maps[1]);
}, 12000);
*/


fcoo.promiseList.options.finally = function(){
fcoo.globalSetting.load(null, function(){
Expand Down
Loading

0 comments on commit 7c81866

Please sign in to comment.