Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to enable pinch to zoom?
    primarykey
    data
    text
    <p>I have created a simple mobile app using Phonegap. It contains a single HTML page, it opens perfectly on my mobile Android device but the pinch to zoom is not enabled. I have tried to add several libraries and meta name but it doesn't seem to work. </p> <p>The HTML page displays a Google Map with markers. Here is the complete code:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Simple Map&lt;/title&gt; &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no"&gt; &lt;meta charset="utf-8"&gt; &lt;META HTTP-EQUIV="Refresh" CONTENT="420"&gt; &lt;style type="text/css"&gt; html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px } .labels { color: orange; background-color: black; font-family: "Lucida Grande", "Arial", sans-serif; font-size: 10px; font-weight: bold; text-align: center; width: 50px; border: 2px solid black; white-space: nowrap;} &lt;/style&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="https://jquery-xml2json-plugin.googlecode.com/svn/trunk/jquery.xml2json.js" type="text/javascript" language="javascript"&gt;&lt;/script&gt; &lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"&gt;&lt;/script&gt; &lt;script src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.0.1/src/markerwithlabel.js"&gt;&lt;/script&gt; &lt;script&gt; var markers = []; var map = null; $.get('Customers.xml', function(xml) { var jsonObj = $.xml2json(xml); $.each(jsonObj.Marker, function(){ var stat = this.site_status == "Critical" ? "http://maps.google.com/mapfiles/ms/micons/red-dot.png" : "http://maps.google.com/mapfiles/ms/micons/green-dot.png"; var mark = { title: this.title, location: this.site_location, icon: stat } markers.push(mark); }); for(var i=0; i&lt; markers.length; i++){ var maddress = markers[i].location; var image = markers[i].icon; var custname = markers[i].title; geocodeAddress(maddress, image, custname,map); } }); function geocodeAddress(maddress, image, custname,map) { var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': maddress}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var myLatlng = new google.maps.LatLng(results[0].geometry.location.lat(),results[0].geometry.location.lng()); var iconBase = 'https://maps.google.com/mapfiles/kml/shapes/'; var marker = new MarkerWithLabel({ position: myLatlng, map:map, icon: image,labelContent: custname, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels", // the CSS class for the label labelStyle: {opacity: 0.75}}); } else { alert("Geocode was not successful for the following reason: " + status); } }); } function initialize() { var chicago = new google.maps.LatLng(35.442579,-40.895920); var mapOptions = { zoom: 4, center: chicago, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="map-canvas"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>What should I add in order to enable 'pinch to zoom' ? Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload