summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/CustomGeometrySourceOptions.java
blob: 4ada38c23848c9e32ed29a50e8095fdc1f064785 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.mapbox.mapboxsdk.style.sources;

/**
 * Builder class for composing CustomGeometrySource objects.
 */
public class CustomGeometrySourceOptions extends GeoJsonOptions {

  /**
   * If the data includes wrapped coordinates, setting this to true unwraps the coordinates.
   *
   * @param wrap defaults to false
   * @return the current instance for chaining
   */
  public CustomGeometrySourceOptions withWrap(boolean wrap) {
    this.put("wrap", wrap);
    return this;
  }

  /**
   * If the data includes geometry outside the tile boundaries, setting this to true clips the geometry
   * to the tile boundaries.
   *
   * @param clip defaults to false
   * @return the current instance for chaining
   */
  public CustomGeometrySourceOptions withClip(boolean clip) {
    this.put("clip", clip);
    return this;
  }

}