Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v4.0 upintheair.json not loaded #84

Closed
Lat31320 opened this issue Oct 1, 2020 · 9 comments
Closed

v4.0 upintheair.json not loaded #84

Lat31320 opened this issue Oct 1, 2020 · 9 comments

Comments

@Lat31320
Copy link

Lat31320 commented Oct 1, 2020

Hi,

The /usr/share/dump1090-fa/html/upintheair.json file is no longer loaded with dump1090-fa 4.0 version despite the script.js (line 933) is checking for its presence.

File ACLs are ok
My "upintheair.json" file is the same for months

Site position is defined (and shown)

Regards.

@mutability
Copy link

Can you try the fix in #82 and see if that helps?

@Thom-x
Copy link

Thom-x commented Oct 2, 2020

You can type this directly into the console to load properly upintheair:

var request = $.ajax({ url: 'upintheair.json',
                               timeout: 5000,
                               cache: true,
                               dataType: 'json' });
        request.done(function(data) {
                var ringStyle = new ol.style.Style({
                        fill: null,
                        stroke: new ol.style.Stroke({
                                color: '#000000',
                                width: 1
                        })
                });

                for (var i = 0; i < data.rings.length; ++i) {
                        var geom = new ol.geom.LineString([]);
                        var points = data.rings[i].points;
                        if (points.length > 0) {
                                for (var j = 0; j < points.length; ++j) {
                                        geom.appendCoordinate([ points[j][1], points[j][0] ]);
                                }
                                geom.appendCoordinate([ points[0][1], points[0][0] ]);
                                geom.transform('EPSG:4326', 'EPSG:3857');

                                var feature = new ol.Feature(geom);
                                feature.setStyle(ringStyle);
                                StaticFeatures.push(feature);
                        }
                }
        });

@Lat31320
Copy link
Author

Lat31320 commented Oct 2, 2020

You can type this directly into the console to load properly upintheair:

var request = $.ajax({ url: 'upintheair.json',
                               timeout: 5000,
                               cache: true,
                               dataType: 'json' });
        request.done(function(data) {
                var ringStyle = new ol.style.Style({
                        fill: null,
                        stroke: new ol.style.Stroke({
                                color: '#000000',
                                width: 1
                        })
                });

                for (var i = 0; i < data.rings.length; ++i) {
                        var geom = new ol.geom.LineString([]);
                        var points = data.rings[i].points;
                        if (points.length > 0) {
                                for (var j = 0; j < points.length; ++j) {
                                        geom.appendCoordinate([ points[j][1], points[j][0] ]);
                                }
                                geom.appendCoordinate([ points[0][1], points[0][0] ]);
                                geom.transform('EPSG:4326', 'EPSG:3857');

                                var feature = new ol.Feature(geom);
                                feature.setStyle(ringStyle);
                                StaticFeatures.push(feature);
                        }
                }
        });

Indeed ! It's ok as instant temporary solution. Thanks.
I'm going to try the fix in #82 now

@Lat31320
Copy link
Author

Lat31320 commented Oct 2, 2020

Can you try the fix in #82 and see if that helps?

The LineString fix do the trick ! Thanks a lot !

@Thom-x
Copy link

Thom-x commented Mar 15, 2021

Bug reintroduced on v5.0

@mutability
Copy link

@eric1tran

@eric1tran
Copy link

@Thom-x Can you try moving your upintheair.json into /usr/share/skyaware/html and let me know if that fixes it? We've created a separate map to merge 1090/978 together. I'll add it to the release notes for users using this feature.

@Thom-x
Copy link

Thom-x commented Mar 15, 2021

It's working for the new merged map. Already tried it 👍

@eric1tran
Copy link

Thanks, I've added it to the release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants