LineStringEditController.java 文件源码

java
阅读 28 收藏 0 点赞 0 评论 0

项目:geomajas-project-client-gwt 作者:
private void updateTempLine(FeatureTransaction featureTransaction, MouseEvent<?> event) {
    if (featureTransaction.getNewFeatures() != null && featureTransaction.getNewFeatures().length > 0) {
        if (tempLine == null) {
            createTempLine(featureTransaction, event);
        }
        Coordinate[] coordinates = getGeometryIndex().getGeometry(featureTransaction).getCoordinates();
        if (coordinates != null && coordinates.length > 0) {
            Coordinate lastCoordinate = getTransformer().worldToPan(coordinates[coordinates.length - 1]);
            LineString lineString = featureTransaction.getNewFeatures()[0].getGeometry().getGeometryFactory()
                    .createLineString(new Coordinate[] { lastCoordinate, getPanPosition(event) });
            tempLine.setGeometry(lineString);
            mapWidget.render(tempLine, RenderGroup.VECTOR, RenderStatus.ALL);
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号