POST
|
Robert. I believe this was working for me last year when you helped me, but now it results in this error. What do you think? The service is public if you want to try. https://gis.manateepao.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/buffer
... View more
05-20-2022
08:50 AM
|
0
|
1
|
392
|
POST
|
I first applied what you showed me to the print widget and a few other widgets and it all worked great, but I was still having trouble with the layerList. let print = new Print({
view: view,
printServiceUrl: printServiceUrl,
container: 'print-block'
}); It was not until your next reply that I realized the issue was due to the layerList loading before the container I put it in was available (I create the calcite-blocks in code behind when an action bar item is clicked. I moved the layerList to the click event of the action bar item where it then loads and works great. Thank you!
... View more
05-17-2022
03:28 PM
|
0
|
0
|
596
|
POST
|
I don't have a layerList container because I'm building the layerList with listItemCreatedFunction. let layerList = new LayerList({
view: view,
listItemCreatedFunction: function listItemCreatedFunction(event) {
var item = event.item; yields In html <calcite-action-bar slot="action-bar">
<calcite-action data-action-id="aerials" text="aerials"></calcite-action>
</calcite-action-bar>
<calcite-panel heading="aerials" height-scale="l" data-panel-id="aerials">
<div id="aerials-container"></div>
</calcite-panel> I'm stuck getting the layerList added to the div. let ac = document.getElementById('aerials-container');
//ac.appendChild(layerList);
... View more
05-16-2022
06:13 PM
|
0
|
3
|
612
|
POST
|
I am trying to relocate a layerList added to an expand widget to a Calcite action bar, but I think that I'm going about it wrong. I am iterating my loaded layerList and building a calcite radio button group that is then added to the action bar. Is this the correct approach? Seems like there's a faster way. Here's a code excerpt of my layerList. var layerListExpand = new Expand({
content: (layerList = new LayerList({
view: view,
listItemCreatedFunction: function listItemCreatedFunction(event) {
var item = event.item;
var key = item.title.toUpperCase().replace(/ /g, '');
if (item.layer.type === 'group' || item.layer.type === 'tile') {
if (key === 'AERIALS') {
watchUtils.whenFalse(item.layer, 'visible', function (newVal) {
layerListFormat(item);
});
watchUtils.whenTrue(item, 'visible', function (newVal) {
layerListFormat(item);
});
}
}
},
})),
view: view,
autoCollapse: true,
expanded: false,
expandTooltip: 'Map Layers',
group: 'top-right',
mode: 'floating',
}); Build radio button group from loaded layerList item.layer.layers.forEach(function (item) {
if (item.type === 'imagery-tile') {
let block = document.createElement('calcite-block');
block.setAttribute('heading', item.title);
block.setAttribute('collapsible', '');
let notice = document.createElement('calcite-notice');
notice.setAttribute('active', '');
let div = document.createElement('div');
div.setAttribute('slot', 'message');
let rbg = document.createElement('calcite-radio-button-group');
rbg.setAttribute('name', 'basic-group');
rbg.setAttribute('layout', 'vertical');
let label = document.createElement('calcite-label');
rbg.setAttribute('layout', 'inline');
rbg.innerHTML = item.title;
let rb = document.createElement('calcite-radio-button');
label.appendChild(rb);
rbg.appendChild(label);
document.querySelector(`[data-panel-id=layers-container]`).appendChild(rbg);
}
});
... View more
05-15-2022
02:05 PM
|
0
|
5
|
679
|
POST
|
Rene. I removed the check for active and added event.graphic.geometry as shown in your answer. I also don't need to capture the screenPoint anymore. Works great. Thanks. params.geometry = event.graphic.geometry;
... View more
04-22-2022
02:09 PM
|
0
|
0
|
601
|
POST
|
Thank you, Rene. I’ll give that a try. This has been working for awhile in 4.17, and it will work in 4.23, but the sketchViewModel state is not always returning active. Must be like you say. Do you think 4.23 requires a different buffer handling than 4.17?
... View more
04-21-2022
05:48 PM
|
0
|
2
|
647
|
POST
|
Since upgrading JS API from 4.17 to 4.23, geometry buffer query is not working well or not working at all. I have two jsitor bins provided below. The first bin was created on 11/17/2020; the bin second was created on 4/19/2022. (Any deprecated objects in version 4.23 were updated). The code is pretty much the same for both, with the exception for line 685 in 4.23 which I need to add in order to prevent a "Missing 'geometry' for identify operation." exception. I think the view on click event is not triggered as quickly as in 4.17, and when the event is triggered, the sketchViewModel.state is "completed" but rarely "active". view.on("click", function (event) { if (sketchViewModel.state === "active") Click the widget in the top right (envelope icon). Click the point icon in the now opened buffer tools panel. Click anywhere on the map. In 4.17, the area will be selected immediately, while in 4.23, nothing! buffer working in esri 4.17 https://jsitor.com/QSx-HVA_s buffer not working in esri 4.23 https://jsitor.com/VXMCiFcYr
... View more
04-21-2022
03:00 PM
|
0
|
4
|
692
|
POST
|
Why does variable string query outFields fail for FeatureLayer? Example: var queryFields = "FIELD1,FIELD2"; const query = mapLayerView.createQuery(); query.outFields = [queryFields]; This works! const queryFeatureLayer = new FeatureLayer({ url: url, outFields: ["FIELD1", "FIELD2"] // outFields: [queryFields] This will return error below }); Error esri.layers.support.fieldProperties] field-attributes-layer:invalid-field Invalid field FIELD1,FIELD2 found in outFields {layer: v, outFields: Array(1)}
... View more
04-20-2022
02:21 PM
|
0
|
1
|
411
|
POST
|
Your map has good height, and the widget can grow. If the map container is small, the widget doesn't have scrollbars. https://www.manateepao.com/parcel/?parid=1005600000
... View more
01-10-2022
07:46 AM
|
0
|
0
|
424
|
POST
|
I have a Print widget inside an Expand widget. When viewing on a mobile device the vertical scrollbars are not available regardless of orientation. Is there a css workaround I can use? var printExpand = new Expand({ content: new Print({ view: view, printServiceUrl: printServiceUrl }), view: view, autoCollapse: true, expanded: false, expandTooltip: 'Print Map', group: "top-right", mode: "floating" });
... View more
01-07-2022
12:01 PM
|
0
|
2
|
462
|
POST
|
I have the same missing font issue when starting a new measurement in JS 4.22, except I have an Internet connection and I am not specifying a font anywhere in my map code. I have not changed any of the measurement widget implementation since 4.12. It is odd to me that this shows as an error in the browser instead of a warning since the framework is using a fallback. I'm not familiar with loading font for esri JS. Is there a complete example somewhere?
... View more
01-06-2022
09:57 AM
|
0
|
1
|
761
|
POST
|
I just updated to js api version 4.22. When starting a new measure using either DistanceMeasurement2D or AreaMeasurement2D widgets, I am getting a 404 for font sans-serif-regular. I do not specify font-family, but I believe we use this font to design layers in ArcGIS Pro. Measure widgets do work, however. Do we need to republish layers using a different font? GET https://static.arcgis.com/fonts/sans-serif-regular/0-255.pbf 404 (index):105 [esri.views.2d.engine.webgl.TextureManager] l {name: 'mapview-invalid-resource', details: undefined, message: "Couldn't find font sans-serif-regular. Falling back to Arial Unicode MS Regular"}
... View more
01-06-2022
09:09 AM
|
0
|
1
|
1614
|
POST
|
I just switched from 4.18 to 4.19 and discovered that both DistanceMeasurement2D & AreaMeasurement2D appear to be broken or changed. Is this a bug or was this method removed? The code example worked as far back as 4.7. Example (works in 4.18) let activeWidget = new AreaMeasurement2D({ view: view, unit: "square-us-feet" }); try { activeWidget.viewModel.newMeasurement(); } catch (error) { console.log(error); // TypeError: activeWidget.viewModel.newMeasurement is not a function } // including https://js.arcgis.com/4.19
... View more
06-15-2021
03:04 PM
|
1
|
2
|
873
|
POST
|
I consume ImageServer tiles from a partner's ArcGIS. Sometimes their ArcGIS server goes down or the permissions change after they republish, and it may be an hour or so before they resolve this. The problem is that the public will see the ArcGIS authentication dialog anytime the map is accessed (see screenshot). Here I create the ImageryTileLayer tlay. var layerUrl = someArcGISUrl + "/" + year + "/AERIAL_" + year + (year > 2002 ? "_RGB" : "_BW") + "/ImageServer"; var tlay = new ImageryTileLayer({ url: layerUrl, title: year }); I don't want the authentication dialog to display. I have not found a way to detect or prevent it. It would be great to have a property that disables showing such dialogs. Here I check for any errors, but "layerview-create-error" will be hit after the authentication dialog is cancelled. tlay.when("layerview-create-error", function(event) { console.info(event); }); prompt
... View more
04-15-2021
07:33 AM
|
0
|
2
|
720
|
POST
|
This sample shows you how to do that. https://developers.arcgis.com/javascript/latest/sample-code/view-disable-zoom/
... View more
04-13-2021
09:56 AM
|
0
|
0
|
2322
|
Title | Kudos | Posted |
---|---|---|
1 | a week ago | |
1 | 01-08-2024 07:24 AM | |
3 | 12-30-2022 11:36 AM | |
1 | 03-13-2023 07:40 AM | |
1 | 02-21-2023 10:25 AM |
Online Status |
Offline
|
Date Last Visited |
a week ago
|