[android] - add get source id to supported layer types

This commit is contained in:
tobrun
2018-09-03 15:43:12 +02:00
committed by Tobrun
parent 18b43f29cf
commit 42aaf3e346
21 changed files with 229 additions and 0 deletions

View File

@@ -67,6 +67,16 @@ public class CircleLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Get the source layer.
*

View File

@@ -67,6 +67,16 @@ public class FillExtrusionLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Get the source layer.
*

View File

@@ -67,6 +67,16 @@ public class FillLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Get the source layer.
*

View File

@@ -67,6 +67,16 @@ public class HeatmapLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Get the source layer.
*

View File

@@ -67,6 +67,16 @@ public class HillshadeLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Set a property or properties.
*

View File

@@ -108,6 +108,9 @@ public abstract class Layer {
@Keep
protected native String nativeGetSourceLayer();
@Keep
protected native String nativeGetSourceId();
@Keep
protected native float nativeGetMinZoom();

View File

@@ -67,6 +67,16 @@ public class LineLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Get the source layer.
*

View File

@@ -67,6 +67,16 @@ public class RasterLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Set a property or properties.
*

View File

@@ -67,6 +67,16 @@ public class SymbolLayer extends Layer {
return this;
}
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
/**
* Get the source layer.
*

View File

@@ -87,6 +87,18 @@ public class <%- camelize(type) %>Layer extends Layer {
return this;
}
<% } -%>
<% if (type !== 'background' && type !== 'custom') { -%>
/**
* Get the source id.
*
* @return id of the source
*/
public String getSourceId() {
checkThread();
return nativeGetSourceId();
}
<% } -%>
<% if (type !== 'background' && type !== 'raster' && type !== 'hillshade') { -%>
/**