/*****************************************************************************
* To prevent strange things happen,
* disable the changing of viewport zoom level by double clicking.
* This code has to run before the device ready event.
*****************************************************************************/
(function() {
var viewportTag = null;
var metaTags = document.getElementsByTagName('meta');
for (var i = 0; i < metaTags.length; i++) {
if (metaTags[i].getAttribute('name') === "viewport") {
viewportTag = metaTags[i];
break;
}
}
if (!viewportTag) {
viewportTag = document.createElement("meta");
viewportTag.setAttribute('name', 'viewport');
}
viewportTag.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
})();
viewport-fit: cover
doesn't have any effect because Google Maps cordova plugin is overwriting meta viewport on loadplugins/cordova-plugin-googlemaps/www/googlemaps-cdv-plugin.js