Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zdavatz/yjg
ywesee javascript geolocation using geo.admin.ch
https://github.com/zdavatz/yjg
admin ch geo geolocation javascript meteor
Last synced: about 2 months ago
JSON representation
ywesee javascript geolocation using geo.admin.ch
- Host: GitHub
- URL: https://github.com/zdavatz/yjg
- Owner: zdavatz
- License: gpl-3.0
- Created: 2020-04-13T07:22:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-17T12:13:28.000Z (10 months ago)
- Last Synced: 2024-05-01T23:16:32.251Z (8 months ago)
- Topics: admin, ch, geo, geolocation, javascript, meteor
- Language: Python
- Homepage:
- Size: 367 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yjg - ywesee javascript geolocation
1. Show button in HTML page.
2. Show Option for user to enter Username.
3. Click the button and grab long/lat with [this library](https://github.com/trekhleb/use-position).
4. Ask for permission to access GPS data on the mobile phone.
5. User clicks the button to share location and his username (optional)
6. Geolocation and Browser-ID is saved in the database.
7. If the Geolocation changes more then 100 meters, the user can save his location again.
8. Translate GPS coordinates into PLZ and Streetname.
9. Output [file](https://covgeo.ch/covgeo_export_daily_7am.csv) updated daily at 7 am.## optional: configure locationiq.com
Get the map token from https://locationiq.com
- copy settings.example.json to settings.json
- add the token
settings.json
```
{
"locationiqComId": "",
"isSSL": false
}```
## Run
```
$ meteor npm i$ meteor --settings settings.json
// with SSL support for localhost testing and selfsigned cert
$ meteor --settings settings.json --port 3100
// without SSL support or with Apache SSL support compiled in
$ meteor --settings settings.json --port 3000```
## Digital Ocean Deployment
### Apache Setup
```
~$ cat /etc/apache2/sites-enabled/yjg.confServerName covgeo.ch
Redirect permanent / https://covgeo.chServerName covgeo.ch
ProxyPreserveHost On
ProxyPass /excluded !
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/covgeo.ch/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/covgeo.ch/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/covgeo.ch/chain.pem```
Apache will need these as well
```
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_ajp
a2enmod rewrite
a2enmod deflate
a2enmod headers
a2enmod proxy_balancer
a2enmod proxy_connect
a2enmod proxy_html
a2enmod proxy
a2enmod ssl
```
### Letsencrypt Setup
```
./certbot-auto certonly --server https://acme-v02.api.letsencrypt.org/directory --manual --preferred-challenges dns -d '*.covgeo.ch' -d covgeo.ch
````### acme TXT Record setup
1. [Set acme Domain TXT records](https://user-images.githubusercontent.com/4953/79723589-51854980-82e6-11ea-8dfc-4f0efe4b6d3c.png)
2. Test acme Setup `dig -t TXT _acme-challenge.covgeo.ch`