- как сделать ArcGIS Runtime SDK для Android
FeatureCollectionTable
показать метку или текст на карте? - или другая функция?
import com.esri.arcgisruntime.geometry.SpatialReferences;
//create shootRender
public class ShootRender {
private FeatureCollectionTable pointTable;
//TestModel:Point json,labelText
public void myRender(FeatureCollection featureCollection,List<TestModel> labels){
pointTable = new FeatureCollectionTable(fields, GeometryType.POINT, SpatialReferences.getWgs84());
featureCollection.getTables().add(pointTable);
if(labels!=null){
for(TestModel item:labels){
//this is show last labelText? how to do write?
TextSymbol textSymbol = new TextSymbol(12, item.labelText, Color.RED, TextSymbol.HorizontalAlignment.CENTER, TextSymbol.VerticalAlignment.MIDDLE);
SimpleRenderer renderer=new SimpleRenderer(textSymbol);
pointTable.setRenderer(renderer);
Point point =(Point) Geometry.fromJson(item.geoJson);
Map<String, Object> attributes = new HashMap<>();
Feature feature = pointTable.createFeature(attributes, point);
pointTable.addFeatureAsync(feature);
}
}
}
}