AI2 Component  (Version nb184)
com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection Interface Reference
Inheritance diagram for com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection:
com.google.appinventor.components.runtime.util.MapFactory.MapFeatureContainer com.google.appinventor.components.runtime.ComponentContainer com.google.appinventor.components.runtime.FeatureCollection

Public Member Functions

boolean Visible ()
 
YailList Features ()
 
void Source (String source)
 
String Source ()
 
void LoadFromURL (String url)
 
void GotFeatures (String url, YailList features)
 
void LoadError (String url, int code, String message)
 
- Public Member Functions inherited from com.google.appinventor.components.runtime.util.MapFactory.MapFeatureContainer
void Features (YailList features)
 
void FeatureClick (MapFeature feature)
 
void FeatureLongClick (MapFeature feature)
 
void FeatureStartDrag (MapFeature feature)
 
void FeatureDrag (MapFeature feature)
 
void FeatureStopDrag (MapFeature feature)
 
Map getMap ()
 
void addFeature (MapFeature feature)
 
Iterator< MapFeatureiterator ()
 
void removeFeature (MapFeature feature)
 
- Public Member Functions inherited from com.google.appinventor.components.runtime.ComponentContainer
Activity $context ()
 
Form $form ()
 
void $add (AndroidViewComponent component)
 
void setChildWidth (AndroidViewComponent component, int width)
 
void setChildHeight (AndroidViewComponent component, int height)
 
int Width ()
 
int Height ()
 

Detailed Description

MapFeatureContainer defines the API for the com.google.appinventor.components.runtime.FeatureCollection component.

Author
ewpat.nosp@m.ton@.nosp@m.mit.e.nosp@m.du (Evan W. Patton)

Definition at line 963 of file MapFactory.java.

Member Function Documentation

◆ Features()

YailList com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.Features ( )

Gets the list of features contained by the feature collection.

Returns
the list of features in the collection.

Implements com.google.appinventor.components.runtime.util.MapFactory.MapFeatureContainer.

◆ GotFeatures()

void com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.GotFeatures ( String  url,
YailList  features 
)

Runs when a call to LoadFromURL(String) succeeds.

features

will contain a list of feature descriptions that can be used with Map#FeatureFromDescription(YailList) to construct new features.

Parameters
urlthe url corresponding to the requested url in LoadFromURL(String)
featuresthe list of feature descriptions read from the resource at
url

Implemented in com.google.appinventor.components.runtime.FeatureCollection.

◆ LoadError()

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.

Parameters
urlthe URL from which a read was attempted.
codethe HTTP status code reported by the server.
messagea human-readable error message sent by the server.

◆ LoadFromURL()

void com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.LoadFromURL ( String  url)

Loads the contents from the given

url

. 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.

Parameters
urlthe URL from which to load a feature collection.

◆ Source() [1/2]

String com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.Source ( )

Gets the source of the feature collection.

Returns
the last asset or url from which the feature collection was successfully read.

Implemented in com.google.appinventor.components.runtime.FeatureCollection.

◆ Source() [2/2]

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.

Parameters
sourceasset name or url from which to load the feature collection

Implemented in com.google.appinventor.components.runtime.FeatureCollection.

◆ Visible()

boolean com.google.appinventor.components.runtime.util.MapFactory.MapFeatureCollection.Visible ( )

Gets whether the map feature collection is visible on the map.

Returns
true if the collection should be drawn, otherwise false.

Implemented in com.google.appinventor.components.runtime.FeatureCollection.


The documentation for this interface was generated from the following file: