mobile: work around leaflet not seeing the WebView size in some cases, causing odd map issues at startup
not 100% certain it fixes it yet, as it doesn't happen every single time...
This commit is contained in:
parent
9e404ac83b
commit
9f08b1d977
@ -174,8 +174,15 @@ window.runOnSmartphonesAfterBoot = function() {
|
||||
addHook('portalSelected', window.setAndroidPermalink);
|
||||
}
|
||||
|
||||
|
||||
// for some reason, leaflet misses the WebView size being set at startup on IITC Mobile
|
||||
// create a short timer that checks for this issue
|
||||
setTimeout (function() { map.invalidateSize(); }, 0.2*1000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
window.setAndroidPermalink = function() {
|
||||
var c = window.map.getCenter();
|
||||
var lat = Math.round(c.lat*1E6)/1E6;
|
||||
|
Loading…
x
Reference in New Issue
Block a user