javascript - error InvalidValueError -


i have error load page : enter image description here

this error appears time time, not see comes have idea? more readability remove style , position of zone.

        var map;         var infowindow;          function initmap() {           map = new google.maps.map(document.getelementbyid('map'), {             zoom: 12,             center: {               lat: 48.862569,               lng: 2.281208             },             maptypeid: 'terrain',             styles: [ // styles]           });            // define latlng coordinates polygon.           var zone = [// zone];            // construct polygon.           var bermudatriangle = new google.maps.polygon({             paths: zone,             strokecolor: '#ff9800',             strokeopacity: 0.8,             strokeweight: 3,             fillcolor: '#ff9800',             fillopacity: 0.35           });           bermudatriangle.setmap(map);            infowindow = new google.maps.infowindow();         }      function showarrays(event) {       var vertices = this.getpath();        var contentstring = '<b>bermuda triangle polygon</b><br>' +         'clicked location: <br>' + event.latlng.lat() + ',' + event.latlng.lng() +         '<br>';        // iterate on vertices.       (var = 0; < vertices.getlength(); i++) {         var xy = vertices.getat(i);         contentstring += '<br>' + 'coordinate ' + + ':<br>' + xy.lat() + ',' +           xy.lng();       }        // replace info window's content , position.       infowindow.setcontent(contentstring);       infowindow.setposition(event.latlng);        infowindow.open(map);     }     function showarrays(event) {   var vertices = this.getpath();    var contentstring = '<b>bermuda triangle polygon</b><br>' +     'clicked location: <br>' + event.latlng.lat() + ',' + event.latlng.lng() +     '<br>';    // iterate on vertices.   (var = 0; < vertices.getlength(); i++) {     var xy = vertices.getat(i);     contentstring += '<br>' + 'coordinate ' + + ':<br>' + xy.lat() + ',' +       xy.lng();   }    // replace info window's content , position.   infowindow.setcontent(contentstring);   infowindow.setposition(event.latlng);    infowindow.open(map); } 

it's function have more detail not know write. it's function have more detail not know write. it's function have more detail not know write.

you have load google maps api after script

 <script>   // code - ie: function initmap(){}    </script>  <script async defersrc="https://maps.googleapis.com/maps/api/jskey=your_api_key&callback=initmap">  </script>  </body> </html> 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -