|
POST
|
I am using a point widget to select an area on the map and highlight it. I then provide a geodesicBuffer to add distance in feet to query for intersecting areas. This is working, but the measurement is taken from the point when I need it taken from the bounding box. Is there a way on create to change the geometry type from a type point to a type rectangle? Point widget. Buffer distance needs to be from bounding box, not point. Polygon widget. Buffer selection is correct. // create a point widget button and add to view let button = document.createElement('button'); button.setAttribute("class","esri-widget--button esri-icon-map-pin geometry-button"); button.setAttribute("id","point-geometry-button"); button.setAttribute("value","point"); // add event to make selection on map document.getElementById("point-geometry-button").addEventListener("click", geometryButtonsClickHandler); // set the sketchviewmodel to a point function geometryButtonsClickHandler(event) { const geometryType = event.target.value; sketchViewModel.create(geometryType); } // how to change to type:"rectangle" ? sketchViewModel.on("create", function (event) { if (event.state === "complete") { sketchGeometry = event.graphic.geometry; //<---"point" } });
... View more
10-12-2020
02:40 PM
|
0
|
5
|
2110
|
|
POST
|
My expand widget height gets too big and looks really bad in responsive mode. For example, when I add a print widget to the expander and the browser width is resized the expanded content increases the height and snaps to the edge of the browser. This makes it difficult to see and even use the print export controls. I am looking for a way to keep the size of the expanded content equal size in either desktop or mobile. Is there CSS I can add to override this? Thanks! var printExpand = new Expand({ content: new Print({ view: view, printServiceUrl: printServiceUrl }), view: view, autoCollapse: true, expanded: false, expandTooltip: 'Print Map', group: "top-right" }); The expanded content here has good dimensions when not in responsive mode Responsive mode
... View more
10-09-2020
12:22 PM
|
0
|
2
|
2064
|
|
POST
|
I have a SketchViewModel for a graphics layer. When I add the layerView to it I need to change some styling at runtime. // create a featureLayer // const featureLayer = new FeatureLayer({ url: myurl }); map.add(featureLayer); // create a mapview and // var view = new MapView({ map: map / / other stuff here }); // Given this basic featureLayer example, I will wait for the layerView to be ready. // view.whenLayerView(featureLayer).then(function(layerView) { How would you go about accessing and changing the style for a LayerView without sifting through all the layers as in the example below? }); Is there a shorter way to get to the layerview style? // this is just an example of what I do not want to do // var maplayers = item.layer.parent.allLayers.filter(function (a) { return a.title === "my layer"; }); var style = maplayers.items[0].sublayers.items.filter(function (a) { // do my runtime styling work here });
... View more
10-08-2020
03:13 PM
|
0
|
0
|
496
|
|
POST
|
I am using a Slider widget and would like to have its value reset to zero when the clear button is clicked. I was hoping there was a property or method for this. I also noticed in the sample here that the slider doesn't reset to zero after the clear button is clicked. SceneLayerView - query statistics by geometry | ArcGIS API for JavaScript 4.17 Slider | ArcGIS API for JavaScript 4.17 <div aria-label="Slider value" aria-labelledby="bufferNum-label-0" aria-orientation="horizontal" aria-valuemax="500" aria-valuemin="0" aria-valuenow="72" aria-valuetext="72ft" class="esri-slider__anchor esri-slider__anchor-0 esri-slider__anchor--moved" id="bufferNum-handle-0" touch-action="none" role="slider" style="left: 14.40083%" tabindex="0"><span class="esri-slider__thumb" touch-action="none"></span><span class="esri-slider__label" id="bufferNum-label-0" touch-action="none">72ft</span></div> const bufferNumSlider = new Slider({ container: "bufferNum", min: 0, max: 500, steps: 1, visibleElements: { labels: true }, precision: 0, labelFormatFunction: function (value, type) { return value.toString() + "ft"; }, values: [0] }); bufferNumSlider.tickConfigs = [{ mode: "position", labelsVisible: true, values: [0, 250, 500] }]; // get user entered values for buffer bufferNumSlider.on( ["thumb-change", "thumb-drag"], bufferVariablesChanged );
... View more
10-08-2020
12:15 PM
|
0
|
1
|
3297
|
|
POST
|
What is available in the esri JS API 4.15+ to control map gestures on mobile devices? When using a pinch gesture to zoom while in fullscreen mode, such as an iPhone or iPad, the gesture is often ignored by the map and instead the browser is minimized. If you perform a pinch gesture slowly it sometimes does zooms in fullscreen mode, but the location of the map jumps to a random location on the globe, e.g., the middle of the ocean.
... View more
09-25-2020
07:39 AM
|
0
|
0
|
884
|
|
POST
|
Is there a click event for tool buttons in sketch widget?
... View more
09-11-2020
11:18 AM
|
0
|
1
|
1768
|
|
POST
|
add what you want var sketch = new Sketch({ layer: somelayer view: view, availableCreateTools: ["polyline", "polygon", "rectangle", "circle"] });
... View more
09-11-2020
11:08 AM
|
0
|
0
|
1540
|
|
POST
|
What error handling can I implement to catch this error (or bug)? The error happens when the first point is added to the map and no measurement is made other than double click on top of the first point. Once this error happens the area measure tool completely fails to work without reloading the page. Uncaught TypeError: Cannot read property 'measurement' of null at d._updateGraphics (AreaMeasurement2DTool.js:20) at d._updateSketch (AreaMeasurement2DTool.js:19) at AreaMeasurement2DTool.js:16 at ?ver=4.16:515 at Array.forEach (<anonymous>) at c.emit (?ver=4.16:515) at d.emit (?ver=4.16:517) at d.n._updateCursor (Sketch.js:405) at Sketch.js:398 at a._callback (?ver=4.16:2113)
... View more
08-28-2020
12:47 PM
|
0
|
1
|
661
|
|
POST
|
I can switch to ImageryTileLayer, but using TileLayer in 4.16 definetly does not work. One of the errors it returns is "use ImageryTileLayer to open a tiled image service" This is one tile layer here. https://www.mymanatee.org/gisimg/rest/services/1940/AERIAL_1940_BW/ImageServer TileLayer yields type:"tile" ImageryTileLayer yields type:"imagery-tile"
... View more
07-15-2020
12:20 PM
|
0
|
2
|
1510
|
|
POST
|
Is there change documentation for version 4.16 that might help me understand why upgrading from 4.15 requires esri/layers/ImageryTileLayer instead of esri/layers/TileLayer ? // TileLayer produces the error "Failed to create view for layer..." var tlay = new TileLayer({ url: layerUrl, title: year }); // changing to ImageryTileLayer solves the issue. var tlay = new ImageryTileLayer({ url: layerUrl, title: year });
... View more
07-15-2020
06:35 AM
|
0
|
5
|
1615
|
|
POST
|
I don't have access, so getting this from admin. Is this the screen?
... View more
02-26-2020
09:54 AM
|
0
|
1
|
1040
|
|
POST
|
When does an image generated from printing tools get deleted? https://some.gis.server/arcgis/rest/directories/arcgisoutput/Utilities/PrintingTools_GPServer/_ags_afa1f30c-5751-11ea-a358-005056b33833.png
... View more
02-26-2020
06:36 AM
|
0
|
3
|
1095
|
|
POST
|
Thanks, Robert. I didn't know that. Can you give me an example for why I would need transparency?
... View more
02-14-2020
07:11 AM
|
0
|
1
|
1642
|
|
POST
|
Thanks. Changing to PNG8 reduced the image size by 65% without any obvious change in quality. PNG8 117k PNG32 331k
... View more
02-14-2020
06:44 AM
|
1
|
3
|
1642
|
|
POST
|
I'm generating and saving them. The diskspace it's costing us could be halved if the average image size was 150k.
... View more
02-13-2020
01:34 PM
|
0
|
0
|
1642
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-30-2024 01:32 PM | |
| 1 | 03-18-2024 08:18 AM | |
| 1 | 01-08-2024 07:24 AM | |
| 3 | 12-30-2022 11:36 AM | |
| 1 | 03-13-2023 07:40 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-12-2025
08:09 AM
|