Trouble with Google Maps Javascript API -


i new javascript , website, please bear me (and english) doing draft hsc project, project using google maps javascript api show location of area. unable find code disable sensor, old api thing had in it, instead of 'callback', disable user of website ability move map around. here able me issue? code using google's sample code. (i have not changed default location keep privacy)

<!doctype html> <html>     <head>         <title>simple map</title>         <meta name="viewport" content="initial-scale=1.0">         <meta charset="utf-8">         <style>       html, body {         height: 100%;         margin: 0;         padding: 0;       }       #map {         height: 100%;       }     </style>       </head>       <body>     <div id="map"></div>     <script>           var map;       function initmap() {         map = new google.maps.map(document.getelementbyid('map'), {               center: {lat: -34.397, lng: 150.644},           zoom: 8         });           }     </script>     <script src="https://maps.googleapis.com/maps/api/js?key=apikey&callback=initmap"     async defer></script>     </body> </html> 

add map:

draggable: false 

for example:

map = new google.maps.map(document.getelementbyid('map'), {     center: {lat: -34.397, lng: 150.644},     zoom: 8,     draggable: false }); 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -