use of com.mapbox.rctmgl.components.styles.sources.RCTSource in project maps by rnmapbox.
the class RCTMGLMapView method removeFeature.
public void removeFeature(int childPosition) {
AbstractMapFeature feature = features().get(childPosition);
if (feature == null) {
return;
}
if (feature instanceof RCTSource) {
RCTSource source = (RCTSource) feature;
mSources.remove(source.getID());
} else if (feature instanceof RCTMGLPointAnnotation) {
RCTMGLPointAnnotation annotation = (RCTMGLPointAnnotation) feature;
if (annotation.getMapboxID() == mActiveMarkerID) {
mActiveMarkerID = -1;
}
mPointAnnotations.remove(annotation.getID());
} else if (feature instanceof RCTMGLImages) {
RCTMGLImages images = (RCTMGLImages) feature;
mImages.remove(images);
}
feature.removeFromMap(this);
features().remove(feature);
}
use of com.mapbox.rctmgl.components.styles.sources.RCTSource in project maps by rnmapbox.
the class RCTMGLMapView method addAllSourcesToMap.
private void addAllSourcesToMap() {
if (mSources.size() == 0) {
return;
}
for (String key : mSources.keySet()) {
RCTSource source = mSources.get(key);
source.addToMap(this);
}
}
use of com.mapbox.rctmgl.components.styles.sources.RCTSource in project maps by rnmapbox.
the class RCTMGLMapView method removeAllSourcesFromMap.
private void removeAllSourcesFromMap() {
if (mSources.size() == 0) {
return;
}
for (String key : mSources.keySet()) {
RCTSource source = mSources.get(key);
source.removeFromMap(this);
}
}
Aggregations