ArcGIS Feature Layer exceeds limit
I'm new to ArcGIS.
I've been using it to publish a Roads Layer service on our ArcGIS server.
Everything seems to be working whenever I upload a Feature Class of a small area as a service. The roads appear on my web app, and everyone is happy.
Now, the service should support the entire world. So for starters, I tried uploading a feature class of California as a service.
The Problem is that roads are loaded randomly instead of whatever is currently in my view. That way, I exceed the limit of features the server returns, and there are huge chunks of areas without roads.
After a crazy amount of researching, I've found how to Query for a specific area to load. Esri's documentation was not very helpful in this regard. Unfortunately, Roads are still loaded randomly in addition to the area requested. How do I load only the areas I query?
I'm using a service I uploaded using ArcMap 10.6 to ArcGIS Server.
Here is the relevant code in Javascript:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
refreshInterval: 0.1
});
Creating a query for distance 1000:
this.props.map.add(this.layer);
// Get a query object for the layer's current configuration
const queryParams = this.layer.createQuery();
queryParams.geometryType = "point";
// set a geometry for filtering features by a region of interest
queryParams.geometry = new Point({
x: -117.19477,
y: 32.81452,
z: 0
});
queryParams.distance = 1000;
let results = await this.layer.queryFeatures(queryParams);
await this.layer.applyEdits({
updateFeatures: results.features
});
this.layer.refresh();
I think I'm missing something tiny but crucial.
If you need any other information to answer this question, please let me know.
Thanks!
arcgis
add a comment |
I'm new to ArcGIS.
I've been using it to publish a Roads Layer service on our ArcGIS server.
Everything seems to be working whenever I upload a Feature Class of a small area as a service. The roads appear on my web app, and everyone is happy.
Now, the service should support the entire world. So for starters, I tried uploading a feature class of California as a service.
The Problem is that roads are loaded randomly instead of whatever is currently in my view. That way, I exceed the limit of features the server returns, and there are huge chunks of areas without roads.
After a crazy amount of researching, I've found how to Query for a specific area to load. Esri's documentation was not very helpful in this regard. Unfortunately, Roads are still loaded randomly in addition to the area requested. How do I load only the areas I query?
I'm using a service I uploaded using ArcMap 10.6 to ArcGIS Server.
Here is the relevant code in Javascript:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
refreshInterval: 0.1
});
Creating a query for distance 1000:
this.props.map.add(this.layer);
// Get a query object for the layer's current configuration
const queryParams = this.layer.createQuery();
queryParams.geometryType = "point";
// set a geometry for filtering features by a region of interest
queryParams.geometry = new Point({
x: -117.19477,
y: 32.81452,
z: 0
});
queryParams.distance = 1000;
let results = await this.layer.queryFeatures(queryParams);
await this.layer.applyEdits({
updateFeatures: results.features
});
this.layer.refresh();
I think I'm missing something tiny but crucial.
If you need any other information to answer this question, please let me know.
Thanks!
arcgis
add a comment |
I'm new to ArcGIS.
I've been using it to publish a Roads Layer service on our ArcGIS server.
Everything seems to be working whenever I upload a Feature Class of a small area as a service. The roads appear on my web app, and everyone is happy.
Now, the service should support the entire world. So for starters, I tried uploading a feature class of California as a service.
The Problem is that roads are loaded randomly instead of whatever is currently in my view. That way, I exceed the limit of features the server returns, and there are huge chunks of areas without roads.
After a crazy amount of researching, I've found how to Query for a specific area to load. Esri's documentation was not very helpful in this regard. Unfortunately, Roads are still loaded randomly in addition to the area requested. How do I load only the areas I query?
I'm using a service I uploaded using ArcMap 10.6 to ArcGIS Server.
Here is the relevant code in Javascript:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
refreshInterval: 0.1
});
Creating a query for distance 1000:
this.props.map.add(this.layer);
// Get a query object for the layer's current configuration
const queryParams = this.layer.createQuery();
queryParams.geometryType = "point";
// set a geometry for filtering features by a region of interest
queryParams.geometry = new Point({
x: -117.19477,
y: 32.81452,
z: 0
});
queryParams.distance = 1000;
let results = await this.layer.queryFeatures(queryParams);
await this.layer.applyEdits({
updateFeatures: results.features
});
this.layer.refresh();
I think I'm missing something tiny but crucial.
If you need any other information to answer this question, please let me know.
Thanks!
arcgis
I'm new to ArcGIS.
I've been using it to publish a Roads Layer service on our ArcGIS server.
Everything seems to be working whenever I upload a Feature Class of a small area as a service. The roads appear on my web app, and everyone is happy.
Now, the service should support the entire world. So for starters, I tried uploading a feature class of California as a service.
The Problem is that roads are loaded randomly instead of whatever is currently in my view. That way, I exceed the limit of features the server returns, and there are huge chunks of areas without roads.
After a crazy amount of researching, I've found how to Query for a specific area to load. Esri's documentation was not very helpful in this regard. Unfortunately, Roads are still loaded randomly in addition to the area requested. How do I load only the areas I query?
I'm using a service I uploaded using ArcMap 10.6 to ArcGIS Server.
Here is the relevant code in Javascript:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
refreshInterval: 0.1
});
Creating a query for distance 1000:
this.props.map.add(this.layer);
// Get a query object for the layer's current configuration
const queryParams = this.layer.createQuery();
queryParams.geometryType = "point";
// set a geometry for filtering features by a region of interest
queryParams.geometry = new Point({
x: -117.19477,
y: 32.81452,
z: 0
});
queryParams.distance = 1000;
let results = await this.layer.queryFeatures(queryParams);
await this.layer.applyEdits({
updateFeatures: results.features
});
this.layer.refresh();
I think I'm missing something tiny but crucial.
If you need any other information to answer this question, please let me know.
Thanks!
arcgis
arcgis
edited Nov 26 '18 at 10:33
Oren_C
asked Nov 22 '18 at 10:27
Oren_COren_C
183113
183113
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I have found the solution:
In ArcGIS Javascript v4.9, When creating the FeatureLayer Object, this property should be added:
definitionExpression: [query object]
for example:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
definitionExpression: this.props.features_query
});
Here's a reference to the API: ArcGIS API Documentation.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428846%2farcgis-feature-layer-exceeds-limit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have found the solution:
In ArcGIS Javascript v4.9, When creating the FeatureLayer Object, this property should be added:
definitionExpression: [query object]
for example:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
definitionExpression: this.props.features_query
});
Here's a reference to the API: ArcGIS API Documentation.
add a comment |
I have found the solution:
In ArcGIS Javascript v4.9, When creating the FeatureLayer Object, this property should be added:
definitionExpression: [query object]
for example:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
definitionExpression: this.props.features_query
});
Here's a reference to the API: ArcGIS API Documentation.
add a comment |
I have found the solution:
In ArcGIS Javascript v4.9, When creating the FeatureLayer Object, this property should be added:
definitionExpression: [query object]
for example:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
definitionExpression: this.props.features_query
});
Here's a reference to the API: ArcGIS API Documentation.
I have found the solution:
In ArcGIS Javascript v4.9, When creating the FeatureLayer Object, this property should be added:
definitionExpression: [query object]
for example:
this.layer = new FeatureLayer({
url: this.featureServiceUrl,
renderer: renderer,
outFields: ["*"],
elevationInfo: {
mode: "on-the-ground"
},
definitionExpression: this.props.features_query
});
Here's a reference to the API: ArcGIS API Documentation.
answered Nov 26 '18 at 10:30
Oren_COren_C
183113
183113
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53428846%2farcgis-feature-layer-exceeds-limit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown