Wappler Weekly Challenge #1


#22

yeah, i did not even begin doing the mobile implementation yet, lol. Sorry i did mean to mention that.


#23

so you know how it actually goes, we will all now focus on the fact that work is not optimized for mobile hahaha.

mmm good work @psweb but don’t know… this mobile issue… mmm it’s ok, finish the mobile and send it again and then we will see, haha.

PS. Congrats once again!!!


#24

The flight API i linked to is great, but my goodness confusing as can be, i did get some custom code very kindly provided from @geoplugin which almost worded perfect, but for the challenge i really only wanted to use what Wappler gave so i did it a little different.
If anyone really figures out how to get that API data working, I would love to know. I got it working for what I needed, but not for what i wanted. @patrick might be so kind as to take a little look.


#25

I’ve just spotted a little typo: ‘OPORTUNITIES’

Another option you might want to add if this facility is to be used for real, is to allow the user to add their own postcode or town. For some reason, my location, based on my IP address presumably, is in Scotland - whereas I actually live near Oxford (UK). It’s about 8 hours by train to the nearest airport (flying to the airport would be a better option).


#26

Hurry up Niko! You can still join the competition!


#27

Well I will try but don’t know @psweb has put the stakes very high!


#28

I am actually working an a way to have better failover but got a little stuck and ran out of time, but certainly I will bug you later possibly to test and see if it pics you up in the right place. Spelling fixed, thanks.


#29

I would be happy to do some testing. Mind you, the air fares from Scotland seem very reasonable…


#30

Ok, I have styled this for mobile too now, so it should work on all and @George I found another way to do the dates so they can be styled for display but submit unstyled so it is prettier.
Now if i could just make that damn flight API faster, I would be oh so happy.

I pull in 180 000 lines of json so i can sort by the cheapest price and then only display that one. So its a lot of data for something quite simple


#31

@TomD If you still around, would you mind testing both ways

Test1: Blocking the Wappler message about tracking
Test2: Allowing the Wappler message about tracking

Can you let me know if either work and locate you correctly, i assume allowing it will do a great job, but denying it could say your IP Address is owned by some ISP a million miles away.

Well thats what I imagine anyway. In a perfect world both should work almost as well as one another.


#32

Hi @psweb, I hope I’ve understood you correctly.

Location was very accurate this time - local airports were correctly identified. There is still a related issue:

Regarding the tracking, I imagiine you mean not allowing this:

image

As you suspected, if ‘Don’t Allow’ is selected, some remote location appears (it goes back to the Scottish locations).


#33

Thanks so much, so we are getting there, haha.

You perfectly understood what i was trying to say about the tracking thing, wonderful.

Now the extend on this lot further, haha, and get this full flight system working as I want it to. :smiley:


#34

Guys, you understand that users location based on their IP is related to the ISPs and their registers, right? :slight_smile:


#35

Yeah, I knew that but its strange how sometimes they are quite close and other times they can be so very very far off the mark. I assume someone did not inform some internet authority that their address pool purchased was addressed incorrectly or something. well that my assumption anyway.

But here is a stupid question, how does wapplers built in one get it so accurate, surely my computer does not have any form of built in gps system, i understand it tracking a phone to perfection but not my desktop computer. What kind of witchcraft is that.


#36

Please check here: https://www.whatismyip.com/ip-address-geolocation-incorrect/
Sometimes the info is just not getting updated immediately :slight_smile: If your IP was used in one region then the network got to some other ISP in another region this may happen.


#37

Wappler geolocation is using HTML5 Geolocation, probably they are just checking different databases: https://www.ip2location.com/html5geolocationapi.aspx


#38

Thanks for explaining, that makes far more sense now. good to know. Im going to put a false mac address into my NIC and see if i can trick it to test if it is using that or the gps or cell tower just out of interests sake.


#39

Exactly in a small country such as switzerland some providers are located about 50-70km away. A different way: On Phone mostly there is a GPS (GPS-A) possible then its assisted with Wifi/Phonecell and very accurate. But Geolocation via IP is very comfortable and for airports enough. But not bus station etc.


#40

Like @Teodor said - it’s based on HTML5 geolocation, which uses triangulation at its base to pinpoint, with near house accuracy your location based on WiFi triangulation (for built up areas) or towers for less built up areas. Triangulation can give a very high degree of resolution because it knows distance to each of the three points (based on strength) so can pinpoint you within the triangle.

In any case, it’s what I understand from it!

IP geolocation is totally useless for cell phones as it pretty much always locates to the city of the head office of the cell phone provider and as IPs change hands all the time, depends on reactivity of the IP Geolocation database provider to maintain their database, which is even slower to trickle down to the free databases, which all geoip services use (since use of the premium database for external IP lookups is always strictly prohibited by their ToS, which is normal)


#41

Hi @TomD - did you have a VPN turned on for this discrepancy to be seen? If not (and even if so), this could explain the discrepancy of results depending on how the backend is using lat/long for the various APIs - (I’m guessing and @psweb could clarify) location being HTML5 related, but airport search is IP-related by default maybe the airport lookup used IP lookup rather than the optional lat/lon parameters ( provided by HTML5)?

In any case @psweb, can you confirm that if browser geolocation (HTML5) is received, those lat/lon values are then used in geoplugin.net lookups (and not IP). That is what should be done to not mix different types of lookup accuracy since HTML5 and IP geolocation will provide different lat/lon values.