[android] url getter on sources
This commit is contained in:
committed by
Ivo van Dongen
parent
625c2ea527
commit
489f76d3a2
@@ -227,6 +227,14 @@ public class GeoJsonSource extends Source {
|
||||
nativeSetUrl(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The url or null
|
||||
*/
|
||||
@Nullable
|
||||
public String getUrl() {
|
||||
return nativeGetUrl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries the source for features.
|
||||
*
|
||||
@@ -243,6 +251,8 @@ public class GeoJsonSource extends Source {
|
||||
|
||||
protected native void nativeSetUrl(String url);
|
||||
|
||||
protected native String nativeGetUrl();
|
||||
|
||||
private native void nativeSetGeoJsonString(String geoJson);
|
||||
|
||||
private native void nativeSetFeatureCollection(FeatureCollection geoJson);
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mapbox.mapboxsdk.style.sources;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
/**
|
||||
@@ -72,8 +74,19 @@ public class RasterSource extends Source {
|
||||
initialize(id, tileSet.toValueObject(), tileSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The url or null
|
||||
*/
|
||||
@Nullable
|
||||
public String getUrl() {
|
||||
return nativeGetUrl();
|
||||
}
|
||||
|
||||
protected native void initialize(String layerId, Object payload, int tileSize);
|
||||
|
||||
@Override
|
||||
protected native void finalize() throws Throwable;
|
||||
|
||||
protected native String nativeGetUrl();
|
||||
|
||||
}
|
||||
|
||||
@@ -76,11 +76,21 @@ public class VectorSource extends Source {
|
||||
return features != null ? Arrays.asList(features) : new ArrayList<Feature>();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The url or null
|
||||
*/
|
||||
@Nullable
|
||||
public String getUrl() {
|
||||
return nativeGetUrl();
|
||||
}
|
||||
|
||||
protected native void initialize(String layerId, Object payload);
|
||||
|
||||
@Override
|
||||
protected native void finalize() throws Throwable;
|
||||
|
||||
protected native String nativeGetUrl();
|
||||
|
||||
private native Feature[] querySourceFeatures(String[] sourceLayerId,
|
||||
Object[] filter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user