本文整理汇总了Java中com.esri.ges.datastore.agsconnection.Layer类的典型用法代码示例。如果您正苦于以下问题:Java Layer类的具体用法?Java Layer怎么用?Java Layer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Layer类属于com.esri.ges.datastore.agsconnection包,在下文中一共展示了Layer类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reloadStops
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public List<Stop> reloadStops(String agsConnectionName, String path, String featureService, String layer)
{
removeAllStops();
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer lyr = agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
//getAllFeatures(String folder, String serviceName, int layerIndex, String queryDefinition, String outFields, boolean includeGeometry, ArcGISServerType serverType, long lastOid)
try
{
List<JsonNode> nodes = agsConnection.getAllFeatures(path, featureService, lyr.getId(), "1=1", "*", true, ArcGISServerType.FeatureServer, 0);
List<Stop> stops = parseFeaturesToStops(nodes);
for(Stop stop : stops)
{
addOrReplaceStop(stop);
}
}
catch (IOException e)
{
log.error(e);
}
return getStops();
}
示例2: reloadVehicles
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public List<Vehicle> reloadVehicles(String agsConnectionName, String path, String featureService, String layer)
{
removeAllVehicles();
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer lyr = agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
try
{
List<JsonNode> nodes = agsConnection.getAllFeatures(path, featureService, lyr.getId(), "1=1", "*", true, ArcGISServerType.FeatureServer, 0);
List<Vehicle> vehicles = parseFeaturesToVehicles(nodes);
for(Vehicle vehicle : vehicles)
{
addOrReplaceVehicle(vehicle);
}
}
catch (IOException e)
{
log.error(e);
}
return getVehicles();
}
示例3: reloadRoutes
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public List<Route> reloadRoutes(String agsConnectionName, String path, String featureService, String layer)
{
removeAllRoutes();
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer lyr = agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
try
{
List<JsonNode> nodes = agsConnection.getAllFeatures(path, featureService, lyr.getId(), "1=1", "*", true, ArcGISServerType.FeatureServer, 0);
List<Route> routes = parseFeaturesToRoutes(nodes);
for(Route route:routes)
{
addOrReplaceRoute(route);
}
}
catch (IOException e)
{
log.error(e);
}
return new ArrayList<Route>(getRoutes());
}
示例4: clearAllStops
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllStops(String agsConnectionName, String path, String featureService, String stopLayer, String geofenceLayer)
{
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer stoplyr = agsConnection.getLayer(path, featureService, stopLayer, ArcGISServerType.FeatureServer);
agsConnection.deleteAllRecordsFromLayer(path , featureService, stoplyr.getId());
removeAllStops();
if(!Validator.isEmpty(geofenceLayer))
{
Layer geofencelyr = agsConnection.getLayer(path, featureService, geofenceLayer, ArcGISServerType.FeatureServer);
agsConnection.deleteAllRecordsFromLayer(path , featureService, geofencelyr.getId());
}
}
示例5: clearAllAlertFeatures
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllAlertFeatures(String agsConnectionName, String path, String featureService, String layer)
{
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer lyr = agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
}
示例6: clearAllMessageFeatures
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllMessageFeatures(String agsConnectionName, String path, String featureService, String layer)
{
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer lyr = agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
}
示例7: clearAllVehicleFeatures
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllVehicleFeatures(String agsConnectionName, String path, String featureService, String layer)
{
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer lyr = agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
removeAllVehicles();
}
示例8: clearAllRouteFeatures
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
@Override
public void clearAllRouteFeatures(String agsConnectionName, String path, String featureService, String layer)
{
ArcGISServerConnection agsConnection = agsConnectionManager.getArcGISServerConnection(agsConnectionName);
Layer lyr = agsConnection.getLayer(path, featureService, layer, ArcGISServerType.FeatureServer);
agsConnection.deleteAllRecordsFromLayer(path , featureService, lyr.getId());
removeAllRoutes();
}
示例9: CreateQueries
import com.esri.ges.datastore.agsconnection.Layer; //导入依赖的package包/类
public void CreateQueries()
{
String connName = properties.get("connection").getValueAsString();
ArcGISServerConnection conn = connectionManager.getArcGISServerConnection(connName);
URL url = conn.getUrl();
String folder = properties.get("folder").getValueAsString();
String service = properties.get("service").getValueAsString();
String lyrName = properties.get("layer").getValueAsString();
Layer layer =conn.getLayer(folder, service, lyrName, ArcGISServerType.FeatureServer);
String layerId = ((Integer)layer.getId()).toString();
String field = properties.get("field").getValueAsString();
String baseUrl = url.getProtocol() +"://"+ url.getHost() + ":" + url.getPort()
+ url.getPath() + "rest/services/";
String curPath = baseUrl + "/" + folder + "/" + service + "/FeatureServer/" + layerId;
String restpath = curPath + "/query?";
HashMap<String, Object> query = new HashMap<String, Object>();
HashMap<String, String> fieldMap = new HashMap<String, String>();
String fldsString = field;
Field[] fields = conn.getFields(folder, service, layer.getId(), ArcGISServerType.FeatureServer);
Boolean usingDist=false;
String lyrHeaderCfg = "";
String distToken="";
String distUnits="";
String wc="";
String itemConfig = "";
wc = properties.get("wc")
.getValueAsString();
lyrHeaderCfg = properties.get("lyrheader").getValueAsString();
usingDist = (Boolean)properties.get("calcDistance").getValue();
if(usingDist)
{
distToken=properties.get("dist_token").getValueAsString();
distUnits=properties.get("dist_units").getValueAsString();
}
String token = properties.get("field-token")
.getValueAsString();
fieldMap.put(field, token);
itemConfig = properties.get("item-config").getValueAsString();
query.put("restpath", restpath);
query.put("path", curPath);
query.put("whereclause", wc);
query.put("fields", fldsString );
query.put("outfields", fields);
query.put("tokenMap", fieldMap);
query.put("headerconfig", lyrHeaderCfg);
query.put("usingdist", usingDist);
query.put("distunits", distUnits);
query.put("disttoken", distToken);
query.put("itemconfig", itemConfig);
query.put("layer", layer.getName());
UUID uid = UUID.randomUUID();
query.put("id", uid);
queries.add(query);
}