@Override public GeometryEditor create(MapPresenter mapPresenter) { return new GeometryEditorImpl(mapPresenter, gfxUtil); }
/** * Is editing busy ? * * @return true when busy, false otherwise */ public boolean isBusyEditing() { return delegate.isBusyEditing(); }
/** * Should snapping be enabled while dragging ? * * @return true when enabled, false otherwise */ public boolean isSnapOnDrag() { return delegate.isSnapOnDrag(); }
/** * Set the map. * * @param map map */ public void setMap(Map map) { this.map = (MapImpl) map; mapWidget = this.map.getMapWidget(); delegate = new GeometryEditorImpl(mapWidget); editingService = new JsGeometryEditService(delegate.getEditService()); splitService = new JsGeometrySplitService(delegate.getEditService()); mergeService = new JsGeometryMergeService(); renderer = new JsGeometryRenderer(delegate.getRenderer()); styleService = new JsStyleService(delegate.getStyleService()); snapService = new JsSnapService(this); }
/** * Should we zoom to the geometry when editing starts ? * * @return true when zooming, false otherwise */ public boolean isZoomOnStart() { return delegate.isZoomOnStart(); }
/** * Should snapping be enabled while inserting ? * * @return true when enabled, false otherwise */ public boolean isSnapOnInsert() { return delegate.isSnapOnInsert(); }
/** * Add the list of snapping rules as they are configured for a specific layer within the XML configuration. * * @param layerId The vector layer to use the configuration from. */ public void addLayerSnappingRules(String layerId) { Layer<?> layer = mapWidget.getMapModel().getLayer(layerId); if (layer != null && layer instanceof VectorLayer) { VectorLayer vLayer = (VectorLayer) layer; for (SnappingRuleInfo snappingRuleInfo : vLayer.getLayerInfo().getSnappingRules()) { SnapRuleUtil.addRule(delegate.getSnappingService(), mapWidget, snappingRuleInfo); } } }
editor = new GeometryEditorImpl(territoryMap); zoomToRectangleController = new ZoomToGeometryRectangleOnceController(territoryMap);