public class VectorSource extends JavascriptObject implements Serializable
counter, JS_GLOBAL, objectIds| Constructor and Description |
|---|
VectorSource(FeatureFormat format)
Creates a new instance.
|
VectorSource(FeatureFormat format,
Loader loader,
Projection projection)
Creates a new instance.
|
VectorSource(FeatureFormat format,
Projection projection)
Creates a new instance.
|
VectorSource(List<Feature> features)
Creates a new instance.
|
VectorSource(List<Feature> features,
FeatureFormat format,
Loader loader,
Projection projection)
Creates a new instance.
|
VectorSource(List<Feature> features,
Projection projection)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
VectorSource |
addFeature(Feature feature)
Adds a feature to the list of features for this data source.
|
VectorSource |
features(List<Feature> features)
Sets the list of features for this source.
|
VectorSource |
format(FeatureFormat format)
Sets the format for the features.
|
List<Feature> |
getFeatures()
Returns a list of features for this source.
|
FeatureFormat |
getFormat()
Returns the format for the features.
|
String |
getJsType()
Returns a String with the type of Javascript object that this object represents.
|
Loader |
getLoader()
Returns the loader used to fetch remote data.
|
Projection |
getProjection()
Returns the projection for this source.
|
VectorSource |
loader(Loader loader)
Sets the loader used to fetch remote data.
|
VectorSource |
projection(Projection projection)
Sets the projection for this source.
|
VectorSource |
removeFeature(Feature feature)
Removes a feature from the list of features for this layer.
|
String |
renderJs()
Returns a String with containing the rendered Javascript code for this object.
|
void |
setFeatures(List<Feature> features)
Sets the list of features for this source.
|
void |
setFormat(FeatureFormat format)
Sets the format for the features.
|
void |
setLoader(Loader loader)
Sets the loader used to fetch remote data.
|
void |
setProjection(Projection projection)
Sets the projection for this source.
|
escapeQuoteJs, getJsId, getJsIdWithSuffixpublic VectorSource(List<Feature> features)
features - List of features for this sourcepublic VectorSource(List<Feature> features, Projection projection)
features - List of features for this sourceprojection - Projection for this sourcepublic VectorSource(FeatureFormat format)
format - Format for this source's featurespublic VectorSource(FeatureFormat format, Projection projection)
format - Format for this source's featuresprojection - Projection for this sourcepublic VectorSource(FeatureFormat format, Loader loader, Projection projection)
format - Format for the feature dataloader - Loader for fetching remote dataprojection - Projection for transforming loaded datapublic VectorSource(List<Feature> features, FeatureFormat format, Loader loader, Projection projection)
features - List of features for this sourceformat - Format for the feature dataloader - Loader for fetching remote dataprojection - Projection for transforming loaded datapublic List<Feature> getFeatures()
public void setFeatures(List<Feature> features)
features - List of Feature instancespublic VectorSource features(List<Feature> features)
features - List of Feature instancespublic VectorSource addFeature(Feature feature)
feature - Feature to add to this layerpublic VectorSource removeFeature(Feature feature)
feature - Feature instance to removepublic FeatureFormat getFormat()
public void setFormat(FeatureFormat format)
format - New valuepublic VectorSource format(FeatureFormat format)
format - New valuepublic Loader getLoader()
public void setLoader(Loader loader)
loader - New valuepublic VectorSource loader(Loader loader)
loader - New valuepublic Projection getProjection()
public void setProjection(Projection projection)
projection - Projection for this sourcepublic VectorSource projection(Projection projection)
projection - Projection for this sourcepublic String getJsType()
JavascriptObjectgetJsType in interface IJavascriptObjectgetJsType in class JavascriptObjectpublic String renderJs()
JavascriptObjectrenderJs in interface IJavascriptObjectrenderJs in class JavascriptObjectCopyright © 2014–2017. All rights reserved.