Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps Googlemaps V3-可拖动多边形错误_Google Maps - Fatal编程技术网

Google maps Googlemaps V3-可拖动多边形错误

Google maps Googlemaps V3-可拖动多边形错误,google-maps,Google Maps,下面是取自GoogleMapAPIv3文档的标准代码。如果将多边形选项设置为“可编辑”和“可拖动”,则当您将鼠标悬停/单击多边形的顶点时,会出现以下错误: 未捕获的TypeError:无法读取null的属性“\uuuue3” 错误是不一致的,因为它是临时出现的 function initMap() { var map = new google.maps.Map(document.getElementById('map'), { center: { la

下面是取自GoogleMapAPIv3文档的标准代码。如果将多边形选项设置为“可编辑”和“可拖动”,则当您将鼠标悬停/单击多边形的顶点时,会出现以下错误:

未捕获的TypeError:无法读取null的属性“\uuuue3”

错误是不一致的,因为它是临时出现的

  function initMap() {
        var map = new google.maps.Map(document.getElementById('map'), {
            center: { lat: -34.397, lng: 150.644 },
            zoom: 8
        });

        var drawingManager = new google.maps.drawing.DrawingManager({
            drawingMode: google.maps.drawing.OverlayType.POLYGON,
            drawingControl: false,
            drawingControlOptions: {
                position: google.maps.ControlPosition.TOP_CENTER,
                drawingModes: ['marker', 'circle', 'polygon', 'polyline', 'rectangle']
            },
            markerOptions: { icon: 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png' },
            polygonOptions: {
                fillColor: '#ffff00',
                fillOpacity: 1,
                strokeWeight: 5,
                clickable: true,
                editable: true,
                draggable:true,
                zIndex: 1
            }
        });
        drawingManager.setMap(map);

        google.maps.event.addListener(drawingManager, 'overlaycomplete', function (event) {

            drawingManager.setDrawingMode(null);
        });

    }

          initMap();
这是api中的错误吗? 如果您对此事有任何意见,我们将不胜感激。 非常感谢