Package org.geomajas.configuration

Examples of org.geomajas.configuration.SnappingRuleInfo


    }
    Coordinate snappedCoordinate = coordinate;
    double snappedDistance = Double.MAX_VALUE;

    for (int i = 0; i < rules.size(); i++) {
      SnappingRuleInfo rule = rules.get(i);

      // Check for supported snapping algorithms: TODO use factory
      if (rule.getType() != SnappingType.CLOSEST_ENDPOINT && rule.getType() != SnappingType.NEAREST_POINT) {
        throw new IllegalArgumentException("Unknown snapping rule type was found: " + rule.getType());
      }

      // Get the target snap layer:
      VectorLayer snapLayer;
      try {
        snapLayer = mapModel.getVectorLayer(rule.getLayerId());
      } catch (Exception e) {
        throw new IllegalArgumentException("Target snapping layer (" + rule.getLayerId()
            + ") was not a vector layer.");
      }

      SnapMode tempMode = this.mode;
      if (snapLayer.getLayerInfo().getLayerType() != LayerType.POLYGON
View Full Code Here

TOP

Related Classes of org.geomajas.configuration.SnappingRuleInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.