Ticket #2928 (new feature)
Opened 3 years ago
OL in a WebApp (IPhone)
|Reported by:||janl||Owned by:|
When using OL in a WebApp on a IPhone (started from HomeScreen), the current iPhoneOS use an other navigator.userAgent. The userAgent doesn't contain the "Safari"-String.
// website with safari Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; de-de) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A306 Safari/6531.22.7 // as webApp Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; de-de) AppleWebKit/532.9 (KHTML, like Gecko) Mobile/8A306
On account of this, the browser-switch in OpenLayers.js won't work and the OL-files load not correct. Also own extensions included via a script-tag won't work, because of missing OL-functions.
On solution to fix this bug should be to extend the browser-switch in OpenLayers.js and take account of the existence of the "AppleWebKit"-String, like in the applied patch. An other solution is to do nothing and wait and hope that the iPhoneOS sometime send the "Safari"-String in WebApp-Mode.