jvde-github / AIS-in-TAR1090

AIS in TAR1090
GNU General Public License v3.0
5 stars 0 forks source link

Doesn't work on tar1090-adsbx #1

Closed Taxom closed 10 months ago

Taxom commented 10 months ago

I added this code in my /usr/local/share/tar1090/html-adsbx/layers_0678a88.js before return layers_group;

........
        const aiscatcher_server = "http://192.168.1.155:8383"; # update with your server address

        const aiscatcher_source = new ol.source.Vector({
            url: aiscatcher_server + '/geojson',
            format: new ol.format.GeoJSON()
        });

......
......

    return layers_group;
}

My aiscatcher config is:


......
 -N 8383 STYLE colors.txt FILE stat.bin BACKUP 60 ABOUT about_test.md MESSAGE on
 -N HISTORY 3600
 -N STATION MaxPi_AIS_Toronto STATION_LINK https://www.myshiptracking.com/stations/station?id=736
 -N PLUGIN_DIR /usr/share/aiscatcher/plugins
 -N LAT 43.6 LON -79.4 share_loc on
 -N kml on
 -N geojson on
 -N REUSE_PORT on
 -N REALTIME on
......

sudo systemctl restart tar1090-adsbx

I cleared cache firefox

but tar1090 doesn't load

ais-tar

jvde-github commented 10 months ago

I added a # in the copy text which is not allowed in JS. The line should read:

const aiscatcher_server = "http://192.168.1.113:8100"; // update with your server address

So try to paste again or just change the # in the aiscatcher_server line to a // or remove the comment.

Does that solve it?

Another issue is CORs blocking....

jvde-github commented 10 months ago

There was also another issue that icons.png was not available on the AIS-catcher server (when KML was not on). So, if you were only running with geojson on, might have to refresh AIS-catcher and/or use kml on for now as well.

Taxom commented 10 months ago

I added a # in the copy text which is not allowed in JS. The line should read:

const aiscatcher_server = "http://192.168.1.113:8100"; // update with your server address

So try to paste again or just change the # in the aiscatcher_server line to a // or remove the comment.

Does that solve it?

Another issue is CORs blocking....

Yes, it worked! Thanks!