summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/storage/Resource.java
blob: f278317d54ef9150d270e87343765c813c21bc1a (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.mapbox.mapboxsdk.storage;

import androidx.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * Resource provides access to resource types.
 */
public final class Resource {
  // Note: Keep this in sync with include/mbgl/storage/resource.hpp

  /**
   * Resource type variants.
   */
  @IntDef( {UNKNOWN, STYLE, SOURCE, TILE, GLYPHS, SPRITE_IMAGE, SPRITE_JSON})
  @Retention(RetentionPolicy.SOURCE)
  public @interface Kind {
  }

  /**
   * Unknown type
   */
  public static final int UNKNOWN = 0;

  /**
   * Style sheet JSON file
   */
  public static final int STYLE = 1;

  /**
   * TileJSON file as specified in https://www.mapbox.com/mapbox-gl-js/style-spec/#root-sources
   */
  public static final int SOURCE = 2;

  /**
   * A vector or raster tile as described in the style sheet at
   * https://www.mapbox.com/mapbox-gl-js/style-spec/#sources
   */
  public static final int TILE = 3;

  /**
   * Signed distance field glyphs for text rendering. These are the URLs specified in the style
   * in https://www.mapbox.com/mapbox-gl-js/style-spec/#root-glyphs
   */
  public static final int GLYPHS = 4;

  /**
   * Image part of a sprite sheet. It is constructed of the prefix in
   *  https://www.mapbox.com/mapbox-gl-js/style-spec/#root-sprite and a PNG file extension.
   */
  public static final int SPRITE_IMAGE = 5;

  /**
   * JSON part of a sprite sheet. It is constructed of the prefix in
   * https://www.mapbox.com/mapbox-gl-js/style-spec/#root-sprite and a JSON file extension.
   */
  public static final int SPRITE_JSON = 6;
}