POST
|
Are you trying to rotate the grid to match the polygon, or are you trying to rotate the polygon to match the grid? Either way, I think the key would be to use geometryEngine.rotate. The first parameter would be the geometry you want to rotate, and the second parameter would be the angle.
... View more
yesterday
|
0
|
0
|
15
|
POST
|
This may not be an issue specific the Search widget since the same behavior can be observed without it. It seems to be a matter of zooming in on a FeatureLayer several levels at once. For example, below are some roads that appear this way after zooming from level 16 to level 19. Here's what it looks like a second or two later after it refreshes: This is the result of a tradeoff the SDK makes for efficient operation. When rendering a feature layer, it requests a generalized (i.e. less detailed) copy of the features' geometry that will still appear the same at the scale you're viewing, while sending less data over the network. For example, my roads looked fine at level 16; it wasn't until I viewed that same geometry at level 19 that it appeared less detailed. Once zoomed in, the SDK retrieved the same features again, but at a level of detail suitable for level 19. You might consider disabling this generalization, but you may notice a significant drop in performance.
... View more
|
1
|
0
|
48
|
POST
|
Can you show the code that executes when the button is clicked? I assume it is the parkResultClickHandler function.
... View more
|
0
|
2
|
33
|
POST
|
Perhaps this might be what you're trying to do: let parselname = feature.attributes.adi_soyadi;
document.getElementById("sonuc").innerHTML = "Malik Bilgisi: " + parselname;
... View more
|
0
|
0
|
15
|
POST
|
The behavior does occur if you set the style property to "none"...perhaps that's what's going on.
... View more
|
0
|
0
|
77
|
POST
|
You access the values via the attributes property. For example: let featureName = document.getElementById("searchInput").value;
let query = layer.createQuery();
query.where = "adi_soyadi = '" + featureName + "'";
query.outFields = ["*"];
query.returnGeometry = true;
layer.queryFeatures(query).then(function(featureSet) {
featureSet.features.forEach(function(feature, index) {
var fieldNames = Object.keys(feature.attributes);
fieldNames.forEach(function(fieldName) {
console.info("Result " + index.toString() + ": " + fieldName + " = " + feature.attributes[fieldName]);
});
});
});
... View more
|
0
|
0
|
52
|
POST
|
This might be what you're trying to do: let featureName = document.getElementById("searchInput").value;
let query = layer.createQuery();
query.where = "adi_soyadi = '" + featureName + "'";
query.outFields = ["*"];
query.returnGeometry = true;
layer.queryFeatures(query).then(function(featureSet) {
featureSet.features.forEach(function(feature) {
//do something
});
});
... View more
|
0
|
0
|
101
|
POST
|
My background is primarily in Oracle, and I've never used Postgres. If you're limited to standardized queries then you won't be able to do this with just a definitionExpression. An alternative would be to query the service with the filters you can use, further filter the results on the client-side, and then add all matching features to a GraphicsLayer or client-side FeatureLayer.
... View more
|
0
|
0
|
34
|
POST
|
We have a basic map service published to ArcGIS Server which displays some polygons. Some of those polygons cross the International Dateline (ID), but they're getting clipped like shown: On the client, this is a basic MapImageLayer. I've noticed when the view crosses the ID, the SDK shifts the central meridian of the extent that gets sent to the export operation of the map service. For the image above, the query parameters for the export operation are shown: As can be seen, the bbox parameters are shifted from the extent of the View, and the Central_Meridian values of the spatial references are set to a value other than the default. I don't really understand the inner workings of all that, but it nevertheless appears to be what's causing the problem. I've come up with a hack to get this showing the expected images like so: This is done by overriding the createExportImageParameters method of MapImageLayer. I use Extent.normalize to determine if the image extent crosses the ID, and if it does, I expand the left piece by the width of the right piece, and use that for bbox instead: var createExportImageParameters = MapImageLayer.prototype.createExportImageParameters;
MapImageLayer.prototype.createExportImageParameters = function(extent, width, height, options) {
var exportImageParameters = createExportImageParameters.apply(this, arguments);
if (exportImageParameters.bbox) {
var extents = extent.normalize();
if (extents.length == 2) {
var ext1 = extents[0];
exportImageParameters.bbox = ext1.xmin.toString() + "," + ext1.ymin.toString() + "," + (ext1.xmax + extents[1].width).toString() + "," + ext1.ymax.toString();
exportImageParameters.bboxSR = JSON.stringify(extent.spatialReference.toJSON());
exportImageParameters.imageSR = exportImageParameters.bboxSR;
}
}
return exportImageParameters;
}; Therefore, the query parameters for the proper image look like this: It seems to be working fine, but could we get this fixed in the SDK itself? Also, if there's a better temporary fix between now and then, I'd be grateful to know as well. This occurred using version 4.29, but I don't know if it occurs in previous versions or not. Also note, we observed the same behavior when loading the individual layers in as FeatureLayers, but I didn't try tracking that one down.
... View more
Thursday
|
0
|
0
|
105
|
POST
|
This is admittedly ugly, and there may be a better way, but in theory it should work: FIELD_NAME LIKE '%"Consultant": "Pediatrics"%' AND TO_NUMBER(SUBSTR(FIELD_NAME, INSTR(FIELD_NAME, 1, '"Sales": ') + 9, INSTR(FIELD_NAME, 1, ', "Assets":') - (INSTR(FIELD_NAME, 1, '"Sales": ') + 9))) > 65 Some databases out there like Oracle provide native support for JSON fields, but I don't think ArcGIS necessarily supports that field type though.
... View more
a week ago
|
0
|
0
|
79
|
POST
|
If the JSON text is stored in string format like shown, I think you'd need a query more like the following (where "FIELD_NAME" is the name of the field being filtered): FIELD_NAME LIKE '%"Consultant": "Pediatrics"%' Setting the definitionExpression would then be something like: layer.definitionExpression = "FIELD_NAME LIKE '%\"Consultant\": \"Pediatrics\"%'";
... View more
a week ago
|
0
|
0
|
103
|
POST
|
This problem has resurfaced in 4.29 because the file is no longer imported directly. Instead, the module is now included in the file esri/views/2d/layers/features/FeaturePipelineWorker.js, so the fix has to be applied there instead. Search for: if(null!=B&&null!=y&&B<=v&&v<=y)return n.name Replace with: if(null!=B&&null!=y&&B<=v&&v<=y)return g
... View more
a week ago
|
0
|
0
|
10
|
POST
|
Does it work if you set the source's popupTemplate from that of the layer? For example: function createSource(layer) {
var source = new LayerSearchSource({
//etc
layer: layer,
popupEnabled: true,
popupTemplate: null,
//etc
});
layer.when(function() {
source.popupTemplate = layer.popupTemplate;
});
return source;
} That should work for a FeatureLayer. If you're using a MapImageLayer, you'd have to get the popupTemplate from within the subLayers collection instead.
... View more
2 weeks ago
|
0
|
1
|
56
|
POST
|
You can also get the layer ID for any result that returns at least one feature by looking at the first feature's layer property, and subsequently the layer's id property: if (result.value.features.length > 0) {
var layerID = result.value.features[0].layer.id;
//etc
}
... View more
2 weeks ago
|
0
|
1
|
99
|
Title | Kudos | Posted |
---|---|---|
1 | Tuesday | |
1 | 2 weeks ago | |
1 | 02-23-2023 03:25 PM | |
3 | 03-28-2024 10:46 AM | |
1 | 03-22-2024 05:35 PM |