Jugendhackt / mkdwv-pwa

Progressive Web Application für "Mit Kot die Welt verbessern"
https://muell.ml
MIT License
2 stars 0 forks source link

[Firefox] position not showing #11

Open schokotets opened 6 years ago

schokotets commented 6 years ago

Even if you accept to send the location data, no marker on the map will appear

marvinschopf commented 6 years ago

I can reproduce this using Firefox Nightly. It detects your current location and centers it, but the marker won't display. Would you like to work on it @SchokoTets ?

schokotets commented 6 years ago

As soon as I'm able to - meaning after sorting out all the server code - i'd like to work on it. Are you sure it detects your current location @MagicMarvMan? Frankfurt is the default map center. It doesn't center the map on my home town while using Firefox 60.0.2

marvinschopf commented 6 years ago

Strange.. when im using it with firefox it centers my hometown. Can you see any markers on the map in your hometown? If not, please write me your hometown in Telegram, so I can add it to the DB. @SchokoTets

jens1o commented 6 years ago

@SchokoTets I think you may encounter the issue that the POSITION_THRESHOLD value is used and thus you don't see any trash bins because noone is in that specific radius. Marvin on the other hand is close enough to see some trash bins.

Works as intended as far as it looks.

schokotets commented 6 years ago

@jens1o to be clear: i'm not talking about trashcan markers. it's about the blue pin that used to appear and which the map used to center on - just like it's working in chrome rn

jens1o commented 6 years ago

Ah okay, now I get your issue. Can reproduce this then too.

marvinschopf commented 6 years ago

@jens1o @SchokoTets I'm getting the markers because I added the trash bins in my hometown to the database.

jens1o commented 6 years ago

Cannot reproduce anymore.

schokotets commented 6 years ago

Still able to reproduce

jens1o commented 6 years ago

On the github.io site I can, but when I run my clone offline, it works perfectly fine. Perhaps I can debug this.

schokotets commented 6 years ago

@jens1o found out it has to do with the web request starting in the initMap() function, more specifically with the call of the populateByTrashcans() function. Maybe an asynchronous call would help?

jens1o commented 6 years ago

So you think like the current Nightly version is too fast and thus winning the racing condition for me?

Maybe an asynchronous call would help?

Unfortunately, asnyc functions in javascript is really new and thus browser support is a pity.