|
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
05-06-2024
10:36 AM
|
0
|
0
|
960
|
|
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
05-02-2024
10:29 AM
|
0
|
1
|
937
|
|
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
04-30-2024
04:14 PM
|
0
|
1
|
1439
|
|
POST
|
If you want to place the Search widget in a container of your choosing, you should specify the ID of the container (or a reference to the container element) in the container property of the widget's constructor. In this case, you would also not use view.ui.add. const searchWidget = new Search({
view: view,
container: "myElementID",
allPlaceholder: "Enter Search Text",
//etc
});
... View more
04-30-2024
10:06 AM
|
1
|
6
|
1713
|
|
POST
|
Please see this post which discusses changing the appearance of the vertex symbol. It was from a year ago, but if things haven't changed, you'd probably want something like: sketchViewModel.set("vertexSymbol.size", "20px");
... View more
04-15-2024
06:15 PM
|
0
|
1
|
1114
|
|
POST
|
The 4.29 implementation of MapView.goTo has changed in an undocumented way that produces different results than 4.28 and prior, particularly in regards to rotation. Our framework allows the user to change the map rotation via various means, and we use goTo in order to animate the change in rotation, rather than setting the rotation property directly (which causes an instant change). In code, it looks like this: view.goTo({rotation:rotation}); When doing this in 4.28 and prior, the map scale was preserved, but not the extent. Starting in 4.29, the extent is preserved, but not the scale. In order to visualize this, see the images below. The first one is the starting state, where rotation is zero (i.e. North is "up"): Now, let's say the user wants to rotate the map 90 degrees counter-clockwise so that East is "up". (In the code, we'd set the rotation value to 270.) Here's what it looks like in 4.28: We see the scale has stayed the same, which is the expected behavior. However, here's what it looks like in 4.29: We see that the map has zoomed out one level in this case. Were my browser maximized at the time, it would've zoomed out two levels instead. If the user were to repeat this process, the map would continue to zoom out each time. Fortunately, this is fairly easy to work around by adding the "center" and "scale" properties in the call to goTo: view.goTo({
rotation: rotation,
center: view.center.clone(),
scale: view.scale
}); On a side note, simply setting the rotation property directly continues to work as before, where scale is preserved.
... View more
03-29-2024
06:13 PM
|
0
|
3
|
4630
|
|
BLOG
|
@Noah-Sager thank you, I see the downloads are available now. However, the size of the 3.46 API download is suspiciously smaller than its predecessors, and after looking into it, I see a very substantial portion of the compact API is missing altogether, as shown in the screenshots below: 3.45 3.46 Any chance we can get this fixed?
... View more
03-28-2024
10:46 AM
|
3
|
0
|
2181
|
|
POST
|
Rather than using a SimpleMarkerSymbol, you might try something like this: Create a Circle with the 5 meter radius. Using the circle's extent, determine the four endpoints for the cross. Create a Polyline with 2 paths, one path being the vertical line, and one path being the horizontal line. Create a Graphic with the polyline as the geometry, and a SimpleLineSymbol as the symbol. Add the graphic to the view's graphics or some other GraphicsLayer. Whenever the mouse moves: Calculate the distance between the map location of the cursor and the center of the polyline's extent. Translate the polyline so it's centered at the mouse's location.
... View more
03-27-2024
11:27 AM
|
0
|
1
|
1385
|
|
BLOG
|
It' s been four weeks now...is there any update on when the downloads will be available?
... View more
03-25-2024
10:20 AM
|
1
|
0
|
2239
|
|
POST
|
Get the TimeSlider date. The timeExtent value you choose depends on the mode. var timeSliderDate = timeSlider.timeExtent.endDate || timeSlider.timeExtent.startDate; Clone the date and zero out the time components: var baseDate = new Date(timeSliderDate.valueOf());
baseDate.setUTCMilliseconds(0);
baseDate.setUTCSeconds(0);
baseDate.setUTCMinutes(0);
baseDate.setUTCHours(0); Get the number of hours between the two date objects: var milliseconds = timeSliderDate.valueOf() - baseDate.valueOf();
var seconds = milliseconds / 1000;
var minutes = seconds / 60;
var hours = minutes / 60; Set the layer's request parameters: UM1_CLOUD_WMTSLayer.set("customLayerParameters.TIME", baseDate.toISOString());
UM1_CLOUD_WMTSLayer.set("customLayerParameters.DIM_FORECAST", Math.round(hours));
... View more
03-22-2024
05:35 PM
|
1
|
0
|
1479
|
|
POST
|
One of the main problems is that your measurements are in feet, but the coordinate system units for Web Mercator are meters. Even then, one might expect 100 meters to be 328.084 feet, but that's not what the screenshot shows either. I've used the logic below to generate rectangles based upon user-entered dimensions, and it works. The "getRectangle" function is the main one, while "getMapDistance" is just a helper. I suppose the efficiency of this particular workflow could be improved since the circle gets created twice, but it is what it is. function getMapDistance(mapPoint, radiusInFeet, ordinate) {
var circle = new Circle({
center: mapPoint,
geodesic: true,
radius: radiusInFeet,
radiusUnit: "feet"
});
return circle.extent[ordinate + "max"] - mapPoint[ordinate];
}
function getRectangle(length, width, centerPoint) {
var mapLength = getMapDistance(centerPoint, length / 2, "x");
var mapWidth = getMapDistance(centerPoint, width / 2, "y");
var xmin = centerPoint.x - mapLength;
var ymin = centerPoint.y - mapWidth;
var xmax = centerPoint.x + mapLength;
var ymax = centerPoint.y + mapWidth;
return Polygon.fromExtent(new Extent({xmin:xmin, ymin:ymin, xmax:xmax, ymax:ymax, spatialReference:centerPoint.spatialReference}));
}
... View more
03-20-2024
10:41 AM
|
0
|
0
|
923
|
|
POST
|
It appears this is driven by the layer's displayField setting. Perhaps you can try setting it to a different field name and seeing if that makes a difference.
... View more
03-20-2024
10:09 AM
|
0
|
1
|
1173
|
|
POST
|
You can get the extent of all the graphics, and then expand it a bit: var extent = null;
graphicsLayer.graphics.forEach(function(graphic) {
if (graphic.geometry.type == "polygon") {
if (extent === null)
extent = graphic.geometry.extent.clone();
else
extent.union(graphic.geometry.extent);
}
});
if (extent !== null)
view.goTo(extent.expand(1.5));
... View more
03-19-2024
11:01 AM
|
0
|
0
|
1449
|
|
POST
|
If you know the index, you can just set the selectedFeatureIndex value: popup.selectedFeatureIndex = 5;
... View more
03-19-2024
10:37 AM
|
1
|
0
|
1844
|
|
POST
|
Please see this thread and this thread, which discuss how to deal with nested properties in a GeoJSON layer.
... View more
03-19-2024
10:29 AM
|
0
|
0
|
920
|
| 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 |