|
POST
|
Is there going to be a calciteListChange event for calcite-list as with the now deprecated calcite-pick-list?
... View more
02-21-2023
10:25 AM
|
1
|
3
|
1187
|
|
POST
|
I recently posted a research question to the github project. We had to change CDN references from unpgk.com to js.arcgis.com because the former no longer responds reliably and appears to have security vulnerability issues, as far as our security goes. During the change, we found that js.arcgis.com performs very well compared to unpkg.com, but the latest version (1.0.7) doesn't exist at js.arcgis.com. Seems strange to me that the latest build wouldn't be here? Additionally, why is the Esri Calcite API documentation so far behind? Research question on github https://github.com/Esri/calcite-components/issues/6492
... View more
02-16-2023
07:23 AM
|
0
|
1
|
628
|
|
POST
|
The Search Widget occassionally returns this error to Chrome console on suggest-complete. Happens on first use but works as expected afterwards. This was reported in an earlier version here. https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-console-errors-showing-up-in-version/m-p/1097835#M74658 Click in search field. suggest-complete Console message [esri.widgets.Search.SearchViewModel] TypeError: Cannot read properties of undefined (reading 'featureResult') at q (https://js.arcgis.com/4.25/:43:249) {stack: 'TypeError: Cannot read properties of undefine… at q (https://js.arcgis.com/4.25/:43:249)', message: 'Cannot read properties of undefined (reading 'featureResult')'} arg1: TypeError: Cannot read properties of undefined (reading 'featureResult')\n at a.parsePBFFeatureQuery (https://js.arcgis.com/4.25/:2160:431)\n at Module.<anonymous> (https://js.arcgis.com/4.25/:2140:466)\n at Generator.next (<anonymous>)\n at d (https://js.arcgis.com/4.25/:38:488)\n at q (https://js.arcgis.com/4.25/:43:249) {stack: 'TypeError: Cannot read properties of undefine… at q (https://js.arcgis.com/4.25/:43:249)', message: 'Cannot read properties of undefined (reading 'featureResult')'} message: 'Cannot read properties of undefined (reading 'featureResult')' stack: 'TypeError: Cannot read properties of undefined (reading 'featureResult')\n at a.parsePBFFeatureQuery (https://js.arcgis.com/4.25/:2160:431)\n at Module.<anonymous> (https://js.arcgis.com/4.25/:2140:466)\n at Generator.next (<anonymous>)\n at d (https://js.arcgis.com/4.25/:38:488)\n at q (https://js.arcgis.com/4.25/:43:249)' [[Prototype]]: Error m._consoleWriter @ js.arcgis.com/4.25/(index):150:331
... View more
01-12-2023
01:39 PM
|
0
|
1
|
822
|
|
POST
|
Can someone please point me to the API docs for actionsMenuEnabled? Thanks.
... View more
12-30-2022
11:43 AM
|
0
|
0
|
1129
|
|
POST
|
You can remove all default actions // Removes the default actions from the popup view.popup.viewModel.includeDefaultActions = false; includeDefaultActions
... View more
12-30-2022
11:36 AM
|
3
|
3
|
4919
|
|
POST
|
This seems to have broken in beta 99. The "X" button is getting focus. beta 97 Sets focus on the component. By default, tries to focus on focusable content. If there is none, it will focus on the close button. To focus on the close button, use the close-button focus ID. let button = document.createElement('calcite-button');
button.setAttribute('slot', 'secondary');
button.innerHTML = 'Cancel';
??? not working
button.setFocus('close-button');
... View more
12-29-2022
10:01 AM
|
0
|
1
|
1154
|
|
POST
|
How do I whenOnce when a MapView is loaded, including any buttons added to ui? Please include link to referenced api. Thanks. This doesn't work. reactiveUtils.whenOnce( () => view.loaded) .then(() => { ... });
... View more
12-22-2022
09:48 AM
|
0
|
1
|
742
|
|
POST
|
I was getting this same error due to a second "goTo" call outside of the promise of the first "goTo" that had not yet resolved.
... View more
11-16-2022
01:11 PM
|
0
|
0
|
5091
|
|
BLOG
|
Has the build for non-ESM releases changed? Apparently, 1.0.0.beta.95 is the last non-ESM build. https://js.arcgis.com/calcite-components/1.0.0-beta.95/calcite.js 404 Not Found https://js.arcgis.com/calcite-components/1.0.0-beta.96/calcite.js Asked here https://github.com/Esri/calcite-components/issues/5667#issuecomment-1297442962
... View more
10-31-2022
11:12 AM
|
0
|
0
|
427
|
|
POST
|
Update to this issue. I have identified the reason why some buffered parcels are not selected. The layerView.features.length is zero. Finding this info, https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html#returnGeometry If true, the query geometry will be returned with the query results. It is useful for getting the buffer geometry generated when querying features by distance or getting the query geometry projected in the outSpatialReference of the query. The query geometry is returned only for client-side queries and hosted feature services and if the layer's capabilities.query.supportsQueryGeometry is true. Setting returnQueryGeometry = true so far appears to resolve this issue.
... View more
10-28-2022
07:30 AM
|
1
|
0
|
509
|
|
POST
|
I'll follow this post up with more details and a jsbin, but right now I was wondering if there is something obvious with this issue and what I can do to troubleshoot it further. I have a layerView query that executes on a buffer. Sometimes, maybe 40% of the time, the query results excludes a few of the buffered parcels by not adding its graphic (as shown in image A), other times the parcel is completely excluded from the query results. My next troubleshooting is to perform the query directly in ArcGIS execute form and try to reproduce the results I'm seeing here. image A image B The basic workflow here is to query geometry with a buffer size and units (like feet), then add graphics to view and update a table with the results of the query. function queryLayerView() {
const queryObject = mapLayerView.createQuery();
queryObject.geometry = sketchGeometryMode();
queryObject.units = unitType;
queryObject.distance = bufferSize;
queryObject.spatialRelationship = 'intersects'; // this is default
//queryObject.returnGeometry = true;
queryObject.outSpatialReference = view.spatialReference;
//queryObject.returnQueryGeometry = true;
//queryObject.returnTrueCurves = true;
//queryObject.returnZ = false;
//queryObject.returnM = false;
queryObject.outFields = ['*']; // all required fields for dataTable export
//queryObject.orderByFields = ['PAR_SUBDIVISION', 'TAXPARCELTYPE'];
queryObject.orderByFields = ['TAXPARCELTYPE', 'PAR_SUBDIVISION'];
//queryObject.returnExtentOnly = false;
//queryObject.returnExceededLimitFeatures = true;
//queryObject.quantizationParameters = {
// mode: "view",
// originPosition: "upper-left",
// tolerance: 4820,
// extent: mapLayerView.fullExtent
// },
// Negate query when user unselects all tax parcel types
if (taxParcelTypesSelectedString != '') {
queryObject.where = `TAXPARCELTYPE IN(${taxParcelTypesSelectedString})`;
} else {
queryObject.where = `TAXPARCELTYPE NOT IN(${taxParcelTypesDefaultString})`;
}
let el = document.getElementById('calcite-block-instruction');
if (el) {
el.heading =
'Now use the Buffer selection slider to create ' +
'a geodesic buffer around the parcel boundary of your point.' +
'Highlighted parcels will be saved to a table for downloading.';
}
let sub_count = {};
// If you query a layerView each time the view extent changes,
// then you must wait until the layerView's updating property
// becomes false to make sure the layerView finished fetching
// the features for that extent.
bufferLayerViewUpdatingFlag = true;
reactiveUtils.whenOnce(() => !mapLayerView.updating)
.then(() => {
bufferLayerViewUpdatingFlag = false;
});
bufferSymbolData = []; // reset
let symbol_id = 0;
return mapLayerView
.queryFeatures(queryObject)
.then((layerView) => {
if (!bufferLayerViewUpdatingFlag) {
view.graphics.removeAll();
let newlayerView = layerView;
layerView.features.forEach((feature) => {
let p = feature.attributes.PAR_SUBDIVISION;
sub_count[p] = (sub_count[p] || 0) + 1;
});
layerView.features.forEach((feature) => {
let par = feature.attributes.PARID;
let sub = feature.attributes.PAR_SUBDIVISION;
let tax = feature.attributes.TAXPARCELTYPE;
let isSubject = lookupSubjectParid(par);
if (bufferSymbolData.find((n) => (n.sub === sub) & (n.tax != 'PARCEL')))
if (sub_count[sub] > 1) return;
let symbolColor = '';
let taxParcelType = feature.attributes.TAXPARCELTYPE;
let rgb = taxParcelTypeColors.filter((obj) => {
if (obj)
if (Object.keys(obj)[0] === taxParcelType)
return obj[taxParcelType];
});
if (rgb && rgb.length > 0) symbolColor = rgb[0][taxParcelType];
let symbol = {
type: 'simple-fill',
outline: { color: [11, 53, 51, 1] },
color: !isSubject ? symbolColor : symbolColorSubject,
};
let g = new Graphic({
geometry: feature.geometry,
//attributes: feature.attributes, // not needed for coloring
symbol: symbol,
});
view.graphics.add(g);
if (showBufferMapIntersectsRank && !isSubject) {
view.graphics.add(g);
}
bufferSymbolData.push({ par: par, sub: sub, tax: tax, symbol: symbol_id });
});
// Exlude the selected parcel address in data table
if (newlayerView.features && newlayerView.features.length > 0) {
updateDataTable(newlayerView, bufferSymbolData)
.then(ScrollLastAccordionIntoView)
.catch((error) => {
console.error(error);
throw new PaoException('queryLayerView', error);
});
}
}
return true;
//}
}, console.error)
.then(() => {
symbol_id = 0;
});
} // end
// set the geometry query on the visible mapLayerView
let debouncedRunQuery = promiseUtils.debounce(function () {
if (!sketchGeometry) {
return;
}
updateBufferPolygon(bufferSize);
// clear highlighting when shared parcel lines and distance = 0
if (bufferSize === 0) {
view.graphics.removeAll();
clearDataTable();
return;
}
return promiseUtils.eachAlways([queryLayerView()]);
}); // end
... View more
10-27-2022
02:44 PM
|
0
|
1
|
550
|
|
POST
|
Ok. Thank you for the suggestion and example, Kitty. I wasn't able to get the Codepen example to reset. But that's Ok because I want to stick with the design I have already built. Removing the component and rebuilding it on a reset is working out for me.
... View more
10-19-2022
02:04 PM
|
0
|
0
|
1359
|
|
POST
|
I want to reset the calcite-dropdown-item to a specific default item anytime a reset of the container is clicked. My code to reset it doesn't work as well as I had hoped. My workflow is to first unset the current selected calcite-dropdown-item and then set the default calcite-dropdown-item. I had to use dispatchEvent to set properties for other elements, but doing this was somewhat incomplete. My solution, which works, is to just remove the calcite-dropdown and rebuild it. container async function resetBufferUnit() {
try {
// remove calcite-dropdown and recreate
document.querySelector('#pao-buffer-unit').remove();
let results = await buildBufferUnitsOption();
let p = document.getElementById('pao-buffer-slider-block');
if (p) p.insertBefore(results, p.firstChild);
// doesn't work right
// get current active unit and reset to default unit feet
/* let el = document.querySelectorAll('#pao-buffer-unit-group1>calcite-dropdown-item[active]');
if (el[0]?.id !== 'pao-unit-feet') {
el[0].active = false;
el[0].removeAttribute('active');
el[0].removeAttribute('selected');
el[0].setAttribute('aria-checked', 'false');
// set default pao-unit-feet
el = document.querySelectorAll('#pao-buffer-unit-group1>calcite-dropdown-item#pao-unit-feet');
if (el) {
el[0].active = true;
el[0].setAttribute('active', '');
el[0].setAttribute('selected', '');
el[0].setAttribute('aria-checked', 'true');
const e = new Event('calciteDropdownSelect');
el = document.getElementById('pao-buffer-unit');
el.dispatchEvent(e);
}
}
*/
} catch (err) {
console.log(err);
}
} // end
function buildBufferUnitsOption() {
return new Promise((resolve) => {
let opt = document.createElement('calcite-dropdown');
opt.setAttribute('id', 'pao-buffer-unit');
opt.setAttribute('overlay-positioning', 'fixed');
opt.setAttribute('placement', 'bottom-start');
opt.setAttribute('type', 'click');
opt.setAttribute('scale', 'm');
opt.style.whiteSpace = 'nowrap';
opt.addEventListener('calciteDropdownSelect', getBufferUnitType);
let btn = document.createElement('calcite-button');
btn.setAttribute('slot', 'dropdown-trigger');
btn.setAttribute('id', 'pao-buffer-unit-button');
btn.setAttribute('scale', 'm');
opt.appendChild(btn);
let grp = document.createElement('calcite-dropdown-group');
grp.setAttribute('id', 'pao-buffer-unit-group1');
grp.setAttribute('selection-mode', 'single');
// Feet
let opt_item = document.createElement('calcite-dropdown-item');
opt_item.setAttribute('id', 'pao-unit-feet');
opt_item.setAttribute('active', '');
opt_item.setAttribute('data-unit-abrv', 'ft');
opt_item.innerHTML = 'Feet';
grp.appendChild(opt_item);
unitType = 'feet'; // init to default feet
// Yards
opt_item = document.createElement('calcite-dropdown-item');
opt_item.setAttribute('id', 'pao-unit-yards');
opt_item.setAttribute('data-unit-abrv', 'yds');
opt_item.innerHTML = 'Yards';
grp.appendChild(opt_item);
// Kilometers
opt_item = document.createElement('calcite-dropdown-item');
opt_item.setAttribute('id', 'pao-unit-kilometers');
opt_item.setAttribute('data-unit-abrv', 'km');
opt_item.innerHTML = 'Kilometers';
grp.appendChild(opt_item);
// Meters
opt_item = document.createElement('calcite-dropdown-item');
opt_item.setAttribute('id', 'pao-unit-meters');
opt_item.setAttribute('data-unit-abrv', 'm');
opt_item.innerHTML = 'Meters';
grp.appendChild(opt_item);
// Miles. (enabled based on parcel density determined by specification)
opt_item = document.createElement('calcite-dropdown-item');
opt_item.setAttribute('id', 'pao-unit-miles');
opt_item.setAttribute('data-unit-abrv', 'mi');
opt_item.innerHTML = 'Miles';
grp.appendChild(opt_item);
opt.appendChild(grp);
resolve(opt);
});
} // end
... View more
10-19-2022
09:08 AM
|
0
|
2
|
1397
|
|
POST
|
elem.setAttribute('tabindex', '2'); -- or -- elem.tabIndex = 2; no change <calcite-dropdown-item tabindex="0" ... calcite-hydrated="">
... View more
10-19-2022
07:15 AM
|
0
|
1
|
607
|
|
POST
|
How do I use --calcite-block-padding to remove padding on block? disablePadding disable-padding deprecated Use --calcite-block-padding CSS variable instead. Here's my code let block = document.createElement('calcite-block');
block.setAttribute('id', 'pao-accordion-block');
block.setAttribute('heading', 'Buffer Results');
block.setAttribute('description', ' '); // populated on table update
block.setAttribute('collapsible', '');
block.setAttribute('open', '');
block.addEventListener(
'calciteBlockToggle',
toggleAccordionBlockDescription
);
... View more
10-07-2022
11:24 AM
|
0
|
2
|
870
|
| 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 |
09-12-2025
08:55 AM
|