Skip to content

Commit

Permalink
double click to zoom disabled in android.. other fixes in android
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Pace committed Aug 27, 2012
1 parent 18cbcd5 commit 9cf6b0a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion assets/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,21 @@ var southWest = new L.LatLng(-38.796,-62.418),
northEast = new L.LatLng(-38.648,-62.135),
cityBounds = new L.LatLngBounds(southWest, northEast);

var map = L.map('map', {maxBounds: cityBounds});

// Disable webkit 3d CSS transformations for tile positioning
// Causes lots of flicker in PhoneGap for some reason...
L.Browser.webkit3d = false;
options = {maxBounds: cityBounds};
if (navigator.userAgent.match(/Android 2/)) {
options.doubleClickZoom = false;
options.touchZoom = false;
// Android 2.x
// @todo enable the pinch-zoom plugin
} else {
options.touchZoom = true;
options.zoomControl = false;
}
var map = L.map('map', options);

cityTilesLayer.addTo(map);
featuresLayer.addTo(map);
Expand Down

0 comments on commit 9cf6b0a

Please sign in to comment.