public SpatialiteTextLayer(
     Projection projection,
     CustomSpatialiteLayer layer,
     String[] userColumns,
     StyleSet<TextStyle> styleSet) {
   super(projection);
   this.spatialiteLayer = layer;
   this.userColumns = userColumns;
   this.styleSet = styleSet;
   if (styleSet != null) {
     this.minZoom = styleSet.getFirstNonNullZoomStyleZoom();
   }
 }
Exemplo n.º 2
0
  /**
   * Vector datasource connector, based on general query
   *
   * @param proj layer projection. NB! data must be in the same projection
   * @param pointStyleSet styleset for point objects
   * @param lineStyleSet styleset for line objects
   * @param polygonStyleSet styleset for polygon objects
   * @throws IOException file not found or other problem opening OGR datasource
   */
  public OnlineVectorLayer(
      Projection proj,
      StyleSet<PointStyle> pointStyleSet,
      StyleSet<LineStyle> lineStyleSet,
      StyleSet<PolygonStyle> polygonStyleSet,
      int maxObjects) {
    super(proj);
    this.pointStyleSet = pointStyleSet;
    this.lineStyleSet = lineStyleSet;
    this.polygonStyleSet = polygonStyleSet;
    this.maxObjects = maxObjects;

    if (pointStyleSet != null) {
      minZoom = Math.min(minZoom, pointStyleSet.getFirstNonNullZoomStyleZoom());
    }
    if (lineStyleSet != null) {
      minZoom = Math.min(minZoom, lineStyleSet.getFirstNonNullZoomStyleZoom());
    }
    if (polygonStyleSet != null) {
      minZoom = Math.min(minZoom, polygonStyleSet.getFirstNonNullZoomStyleZoom());
    }
    Log.debug("OnlineVectorLayer minZoom = " + minZoom);
  }