Google maps 阻止谷歌地图多边形编辑。
我在谷歌地图上有一个绘制多边形的工具 现在,当我画一个多边形时,我看到它周围的圆圈使多边形可编辑 是否有一个设置来绘制多边形并将其固定在地图中?我的意思是无法编辑 我的代码:Google maps 阻止谷歌地图多边形编辑。,google-maps,google-maps-api-3,Google Maps,Google Maps Api 3,我在谷歌地图上有一个绘制多边形的工具 现在,当我画一个多边形时,我看到它周围的圆圈使多边形可编辑 是否有一个设置来绘制多边形并将其固定在地图中?我的意思是无法编辑 我的代码: // Creates a drawing manager attached to the map that allows the user to draw Polygons drawingManager = new google.maps.drawing.DrawingManager({ draw
// Creates a drawing manager attached to the map that allows the user to draw Polygons
drawingManager = new google.maps.drawing.DrawingManager({
drawingControlOptions: {
drawingModes: [
google.maps.drawing.OverlayType.POLYGON
]
},
polygonOptions: polyOptions,
map: map
});
谢谢多边形选项有
可编辑
、可拖动
和可点击
属性。将它们全部设置为false
,您将无法编辑、拖动甚至单击多边形。如果您想允许单击,可以将其保留在true
polyOptions: {
clickable: true,
draggable: true,
editable: true,
//there can be other option like fillColor, fillOpacity...
}
如果我的回答对你的问题有帮助,请接受/投票。对不起,我忘了:)