Closed bbbhltz closed 4 years ago
I don't get any maps either. I will investigate more, although I don't recall making any map-related changes in the burst of activity over the last few weeks. Perhaps it's related to our API Key, we might have hit a limit?
@pasdechance To be clear, did you use Forecastie previously? It sounds like this bug first manifested when you got a different phone, with a different version of Android.
It is just on this phone (Nokia 5.3 Android 10), my 2 older phones with older versions of Android work.
Also: "Il N'a Pas De Chance"?
Also: "Il N'a Pas De Chance"?
Squarepusher
Perhaps we did not fully take into account what SDK29/AndroidX would mean, there may now be more restrictions on what we can do with Webview.
@fantel, given you did the SDK29/AndroidX upgrade, would you be able to glance over this? Thanks
I'll look at this. On my Nokia 6.2 with Android 10 maps are visible but rain, temperature and so on aren't.
I'll look at this. On my Nokia 6.2 with Android 10 maps are visible but rain, temperature and so on aren't.
I'm not sure what you mean. Are you saying the OSM map underlay shows up, but the coloured overlays for the weather do not?
Yes, the OSM map underlay shows up, but the coloured overlays for the weather do not. But I think it may be connected.
That's interesting, I don't get anything, same as the OP.
With the latest version from repository it's the same for me: OSM map tiles show up, but no OWM overlays. This is the log output:
I/chromium: [INFO:CONSOLE(97)] "Uncaught ReferenceError: NativeInterface is not defined", source: file:///android_asset/map.html?lat=XXX&lon=YYY&appid=ZZZ&zoom=7 (97)
Looks like the object NativeInterface
in line 97 of the map.html
file is unknown to WebView. Also I wasn't able to find anywhere the implementation of both methods NativeInterface.transferLatLon()
and NativeInterface.transferZoom()
which are apparently called by JavaScript.
Does someone know the App's revision where the map still worked and and can we identify the changes that introduced this behaviour? Or maybe the way how JavaScript is configured in WebView misses something?
The problem with "Uncaught ReferenceError: NativeInterface is not defined"
is just an log info in the WebView console. It should not be the cause for the missing map.
But I could find out a bit more: NativeInterface
was introduced with 9baefb99b1d55b9bfd93a6cd5844fafe44e88058 to remember the map position and zoom level. It was (probably accidentially?) removed from MapActivity.java
by 34ff6a74a767f20071ee88e5803c0df0554f6fcb.
There should be no limit reached for the OWM weather overlays. I could directly request the overlay images in a desktop browser for all four layers without problems using Forecastie's API key.
Golly, we didn't notice for six months....
I noticed that all map layers did not use https URLs yet, so I changed them to https and that made all map layers visible for me again (Android 10). It still isn't clear to me why I could see the OpenStreetMap background before, but not the OpenWeatherMap overlays.
Can anyone else test and confirm that the maps show up again with #543 applied?
OK, new release out, looks like it's fixed. Please report if there are any issues,
OSM map tiles show up, but no OWM overlays. This is the log output:
Same. Forecastie v1.22.1, Blackview BV8000 Pro (Android 7.0). Do I need to create a separate issue?
Just tested: It's working for me with Forecastie 1.22.1 from F-Droid running on Android 11.
@Korb Are you sure the OWM overlays are not working? They are very blurry and low resolution, sometimes you need to zoom out to see any noticeable weather on the map. In case it's really broken for you, could you please provide error messages or log output?
@FridoDeluxe, see screenshots. No error messages appear. I don't know how to get the log output.
@Korb Everything is fine, it is working for you. On the first of your screenshots you can see white clouds over the Neva Bay, on the fourth map you can see the orange color due to the temperature overlay (almost getting red in the hotter regions in the south).
Unfortunately the weather overlays from OWM have a quite low resolution and are mostly transparent, that's why they are not very noticeable (and not that useful in my eyes). If you zoom out a bit, you should see differences in the overlays in most cases. There are already issues mentioning the low contrast of the weather overlay (#563) and the missing scale/legend (#155).
I don't have any maps on my new phone. I don't think it is a big deal because I don't really use the maps feature. I am using a new phone configured the same as my older phone but have jumped from Android 8 to 10.
I have applied the Universal Android Debloater on both of my phones if that is of interest.