Fixed zoom controls not being hidden on mobile

This commit is contained in:
fkloft 2014-01-03 15:51:41 +01:00
parent 65f5308854
commit 14d3fe82c2
2 changed files with 2 additions and 1 deletions

View File

@ -136,7 +136,7 @@ window.setupMap = function() {
window.map = new L.Map('map', { window.map = new L.Map('map', {
center: [0,0], center: [0,0],
zoom: 1, zoom: 1,
zoomControl: (typeof android !== 'undefined' && android && android.showZoom) ? !android.showZoom() : true, zoomControl: (typeof android !== 'undefined' && android && android.showZoom) ? android.showZoom() : true,
minZoom: 1 minZoom: 1
}); });

View File

@ -190,6 +190,7 @@ public class IITC_JSInterface {
}); });
} }
@JavascriptInterface
public boolean showZoom() { public boolean showZoom() {
PackageManager pm = mIitc.getPackageManager(); PackageManager pm = mIitc.getPackageManager();
boolean hasMultitouch = pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH); boolean hasMultitouch = pm.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH);