本文整理匯總了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);
}