AI2 Component
(Version nb184)
|
MapFeatureContainer defines the API for the com.google.appinventor.components.runtime.FeatureCollection component.
Definition at line 963 of file MapFactory.java.
YailList com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.Features | ( | ) |
Gets the list of features contained by the feature collection.
Implements com.google.appinventor.components.runtime.util.MapFactory.MapFeatureContainer.
void com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.GotFeatures | ( | String | url, |
YailList | features | ||
) |
Runs when a call to LoadFromURL(String) succeeds.
will contain a list of feature descriptions that can be used with Map#FeatureFromDescription(YailList) to construct new features.
url | the url corresponding to the requested url in LoadFromURL(String) |
features | the list of feature descriptions read from the resource at url
|
Implemented in com.google.appinventor.components.runtime.FeatureCollection.
void com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.LoadError | ( | String | url, |
int | code, | ||
String | message | ||
) |
Runs when an error occurs reading a feature collection from a URL.
url | the URL from which a read was attempted. |
code | the HTTP status code reported by the server. |
message | a human-readable error message sent by the server. |
void com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.LoadFromURL | ( | String | url | ) |
Loads the contents from the given
. On success, the GotFeatures(String, YailList) event is run with a description of the features. On error, LoadError(String, int, String) is run with a description of the error. At this time, the only supported format is GeoJSON.
url | the URL from which to load a feature collection. |
String com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.Source | ( | ) |
Gets the source of the feature collection.
Implemented in com.google.appinventor.components.runtime.FeatureCollection.
void com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.Source | ( | String | source | ) |
Sets the source of the feature collection. This is a designer only property that is used to support loading feature collections in the web editor.
source | asset name or url from which to load the feature collection |
Implemented in com.google.appinventor.components.runtime.FeatureCollection.
boolean com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.Visible | ( | ) |
Gets whether the map feature collection is visible on the map.
Implemented in com.google.appinventor.components.runtime.FeatureCollection.