0

I have a skin on my desktop which shows my current location and the weather in the next few days for that location.

enter image description here

The only problem is I can't get my location or location code from a web page, I've tried but with no success

The weather part works fine but I don't want to have to manually change the location code every time I go somewhere.

The code below is from a .ini file, I'm not sure what language it is.

How can I get my location from any of these URL?

[LocationParent]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=https://mycurrentlocation.net/index.php
#https://mycurrentlocation.net/index.php
#https://mycurrentlocation.net/js/mycurrentlocation.js
#https://maps.googleapis.com/maps/api/js/GeocodeService
#https://maps.googleapis.com/maps-api-v3/api/js/25/9/intl/en_gb/geocoder.js


RegExp="formatted_address" : ".*, (.*),
#"formatted_address" : ".*, (.*),
#"short_name" : "(.*)"types" : .*
#[\r\n | \n]
#^(.s)$
ForceReload=1
FinishAction=[!EnableMeasureGroup Weather][!UpdateMeter *][!Redraw]

[LocationChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[LocationParent]
StringIndex=1

This is the original skin which I modified: http://www.deviantart.com/art/Sunny-Rainmeter-Suite-v2-0-613381825

Tom Fuller
  • 5,291
  • 7
  • 33
  • 42
  • I might start a bounty soon – Tom Fuller Oct 24 '16 at 12:43
  • Without using something like GPS you will never get a good estimation of your location using IP. This would require that your ISP releases your home adress with your IP. And that will hopefully never happen. Generally it is ok though to use the location provided since the weather stations are generally not located near your house and just interpolate the information from multiple stations around your location. – thatsIch Nov 20 '16 at 08:06
  • This website: https://mycurrentlocation.net when you click allow gives my exact location, It says it uses GPS. I just can't find the data I need using a web parser. – Tom Fuller Nov 20 '16 at 10:06
  • It is using the GPS functionality of the browser like your mobile phone can do. A webparser is just a fancy `curl` so I doubt it works the same way. – thatsIch Nov 20 '16 at 12:58
  • Do you think there's another way to get the location from it? Like an alternative to a webparser – Tom Fuller Nov 20 '16 at 19:00
  • Not unless you work in the law enforcement. [This](https://www.iplocation.net/) is the best I found so far and you can use it to triangulate your real position. Though none of them could pinpoint my real location (not even close tbh 30km+). You can get finer readings depending on your ISP (which IP ranges he buys) – thatsIch Nov 20 '16 at 19:59
  • Alright, never mind then. Thanks for your help though! – Tom Fuller Nov 20 '16 at 23:12
  • Using geolocation with IP address is pretty useless if someone uses a VPN service and later complains that our app doesn't work accurately enough, huh! – ecle May 26 '19 at 03:31

0 Answers0