|
IDEA
|
This appears to be a bug. Below is a screenshot from our viewer with a red border added around the map image, and a blue border around the map's element on the page: The documentation for MapView.extent says this (my emphasis added): "The extent represents the visible portion of a map within the view as an instance of Extent." Based on this, my understanding is that the extent property in this instance should return the coordinates of the red rectangle, but it actually returns the coordinates of the blue rectangle.
... View more
05-23-2024
01:45 PM
|
0
|
0
|
993
|
|
POST
|
I'm sorry, I guess I don't understand the problem, and the code being in a different language adds to the confusion. I'm not sure I can help with this one.
... View more
05-20-2024
11:25 AM
|
0
|
0
|
2200
|
|
POST
|
Ok, it looks like I asked for the wrong thing. You said you're trying to query two layers, but only seeing results for one. Can you show the code for where you're querying the two layers? I only see code where one layer is being queried.
... View more
05-16-2024
10:31 AM
|
0
|
2
|
2259
|
|
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
05-15-2024
04:22 PM
|
0
|
0
|
998
|
|
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
05-14-2024
10:14 AM
|
1
|
0
|
1474
|
|
POST
|
Can you show the code that executes when the button is clicked? I assume it is the parkResultClickHandler function.
... View more
05-14-2024
09:13 AM
|
0
|
4
|
2294
|
|
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
05-13-2024
10:42 AM
|
0
|
1
|
1614
|
|
POST
|
The behavior does occur if you set the style property to "none"...perhaps that's what's going on.
... View more
05-13-2024
10:38 AM
|
0
|
0
|
1812
|
|
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
05-13-2024
10:08 AM
|
0
|
0
|
2313
|
|
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
05-10-2024
09:59 AM
|
0
|
0
|
2362
|
|
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
05-10-2024
09:52 AM
|
0
|
0
|
2741
|
|
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) && (this.spatialReference?.isWrappable)) {
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
05-09-2024
05:45 PM
|
0
|
1
|
864
|
|
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
05-08-2024
10:08 AM
|
0
|
0
|
2786
|
|
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
05-07-2024
10:20 AM
|
0
|
0
|
2810
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-19-2024 10:37 AM | |
| 1 | 03-31-2026 02:34 PM | |
| 1 | 12-09-2025 09:35 AM | |
| 2 | 12-09-2025 09:06 AM | |
| 1 | 11-26-2025 12:29 PM |