简体   繁体   English

如何使用openlayers在ios模拟器中绘制手绘多边形?

[英]How do you draw a freehand polygon in ios simulator using openlayers?

In my app in a browser i can do this with the shift key. 在浏览器中,我可以使用Shift键来执行此操作。 But does anyone know how to do this using the ios simulator? 但是,有人知道如何使用ios模拟器执行此操作吗?

Just pass the appropriate option to the DrawFeature control handler ( freehand ): 只需将适当的选项传递给DrawFeature控件处理程序( freehand ):

new OpenLayers.Control.DrawFeature(vectorLayer, OpenLayers.Handler.Path, {
    handlerOptions: {
        freehand: true
    }
});

Then you'll always be in freehand mode, without the need for the shift key. 然后,您将始终处于徒手模式,而无需使用Shift键。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM