POST
|
This is using a portal item, I can get that to work. It's a feature service where the issue is. User error. Thanks for the help!
... View more
|
1
|
0
|
74
|
POST
|
Is it possible to edit a stand-alone table from a feature service with the Javascript API? I can do it using online and experience builder, but cannot figure it out using just the native Javascript API. Anyone have an example on how it's done? I am not trying to add it to the map/view or anything like that, just accessing the information to be edited. This is the error I get: Failed to resolve layer view (layer title: 'n', id: '####') f {name: 'featurelayerview:table-not-supported', details: {…}, message: "table feature layer can't be displayed"}
... View more
|
0
|
2
|
151
|
POST
|
Here is a example of changing the calcite design. I switched the chevrons to arrows. https://codepen.io/mbdriscoll/pen/wvZyXoE?editors=1010
... View more
2 weeks ago
|
0
|
0
|
29
|
POST
|
I see. I think you are going to need to customize the calcite. I looked here, but cannot find which would be the best place to start.
... View more
2 weeks ago
|
0
|
0
|
37
|
POST
|
ESRI Icons const directionalPad = new DirectionalPad({
view: view
icon: "esri-icon-handle-horizontal",
})
... View more
2 weeks ago
|
0
|
3
|
76
|
POST
|
Here is a working code pen using your same layer. Your area is just west of where my map loads. https://codepen.io/mbdriscoll/pen/gOyprmg?editors=1010
... View more
03-08-2024
08:05 AM
|
0
|
0
|
189
|
POST
|
What I did was add the highlight ids and filtered that. Below is a bigger picture. let queryBP = bldPermLayer.createQuery();
queryBP.where = finQueryBP
queryBP.outFields = ["*"];
// do the query
bldPermLayer
.queryFeatures(queryBP)
.then((response) => {
const graphics = response.features;
//console.log(response.features.length);
if(response.features.length === 0){
alert("Search query found no results.");
return
}else{
for(let iii=0; iii < response.features.length; iii++){
featureTable.highlightIds.add(response.features[iii].attributes.objectid);
featureTable.filterBySelection();
console.log("this is the search")
}
};
tabContain.style.visibility = "visible";
bpContain.style.display = "none";
});
// Attach the event listener outside of the featureTable.when callback
const grid = featureTable.container.querySelector("vaadin-grid");
if (grid) {
grid.addEventListener("cell-activate", cellActivateHandler);
} else {
console.log("Feature table grid not found.");
};
grid.removeEventListener("cell-activate", cellActivateHandler);
grid.addEventListener("cell-activate", cellActivateHandler);
... View more
03-08-2024
06:52 AM
|
1
|
3
|
125
|
POST
|
This is how I did it. The feature tables are vaadin-grids. // Attach the event listener
const grid = featureTable.container.querySelector("vaadin-grid");
if (grid) {
grid.addEventListener("cell-activate", cellActivateHandler);
} else {
console.log("Feature table grid not found.");
};
grid.removeEventListener("cell-activate", cellActivateHandler);
grid.addEventListener("cell-activate", cellActivateHandler); // Define the cellActivateHandler function
function cellActivateHandler(e) {
// Important to remove the event listener or it will hold on to the last query and iterate the next one.
// Then add it back so it can continue to listen on same table.
const feature = e.detail.model.item.feature;
const permitNump = feature.attributes.fldpermitnum;
const pidBPp = feature.attributes.fldcamanum_1_txt;
const datedatap = feature.attributes.fld_permitdate;
const newdatep = new Date(datedatap);
const finYearp = newdatep.getFullYear();
const query = new Query({
where: "PID = '" + pidBPp + "'",
outFields: ["*"],
returnGeometry: true,
});
// Check if the feature table is ready
if (featureTable && featureTable.container) {
if(BPhighlights){
BPhighlights.remove();
};
parcelLayer.queryFeatures(query).then(function (result){
if(result.features.length === 0){
alert("The PID for this permit no longer exists!")
return
};
BPhighlights = parcelLayerViewBP.highlight(result.features);
// Create a highlight graphic and add it to the graphics layer
result.features.forEach(function (feature){
var parcelExtent = feature.geometry.extent.clone().expand(1.5);
theView.goTo({
target: parcelExtent,
zoom: 15.75
});
});
});
} else {
// Feature table is not ready, handle accordingly
console.log("Feature table is not ready.");
};
}
... View more
03-07-2024
01:51 PM
|
0
|
5
|
138
|
POST
|
Maybe a Picture Marker Symbol? Maybe play around in the symbol builder? Honestly it might be easiest to create in Pro and host it.
... View more
03-07-2024
01:25 PM
|
0
|
0
|
89
|
POST
|
This works for me. const labelClass = {
// autocasts as new LabelClass()
symbol: {
type: 'text', // autocasts as new TextSymbol()
color: 'yellow',
haloColor: 'black',
haloSize: 1,
font: {
// autocast as new Font()
family: 'playfair-display',
size: 12,
weight: 'bold',
},
},
deconflictionStrategy: 'none',
maxScale: 0,
minScale: 15000,
labelPlacement: 'always-horizontal',
labelExpressionInfo: {
expression: '$feature.FID',
},
};
const SoilsLayer = new FeatureLayer({
url: 'https://services1.arcgis.com/uye9M5KkL8B18MZq/arcgis/rest/services/KS_Soils/FeatureServer/0',
//apiKey: apiKey,
//minZoom: 12, // Minimum zoom level of 12
//renderer: L.canvas({ pane: 'middle' }),
labelingInfo: [labelClass],
lablelsVisible: true,
style: {
color: 'yellow', // Grey border
weight: 1, // Border width
fillColor: 'none', // No fill
fillOpacity: 0,
},
})
map.add(SoilsLayer)
... View more
03-07-2024
12:54 PM
|
1
|
2
|
216
|
POST
|
You changed some class names in the html, so you need to do that in the javascript too. .category-item data-category const seasonsNodes = document.querySelectorAll(`.category-item`);
const seasonsElement = document.getElementById("seasons-filter");
// click event handler for seasons choices
seasonsElement.addEventListener("click", filterBySeason);
// User clicked on Winter, Spring, Summer or Fall
// set an attribute filter on flood warnings layer view
// to display the warnings issued in that season
function filterBySeason(event) {
console.log(document.querySelectorAll('.category-item'));
const selectedSeason = event.target.getAttribute("data-category");
floodLayerView.filter = {
where: "Category = '" + selectedSeason + "'"
};
}
... View more
03-07-2024
12:27 PM
|
0
|
1
|
95
|
POST
|
See this code pen for a working example. It replaces "," with " ZZZZ '. https://codepen.io/mbdriscoll/pen/gOyprmg
... View more
03-04-2024
08:49 AM
|
1
|
2
|
171
|
POST
|
You need to do this using arcade in the expressionInfos.
... View more
03-04-2024
08:42 AM
|
1
|
3
|
171
|
POST
|
Here is a working codepen example. I have the timeout set really high so you will need to wait around 15-30 seconds to see the opacity change on the 4th item in the legend. https://codepen.io/mbdriscoll/pen/XWQWexm
... View more
02-29-2024
07:52 AM
|
1
|
1
|
87
|
Title | Kudos | Posted |
---|---|---|
1 | Monday | |
1 | 03-08-2024 06:52 AM | |
1 | 03-07-2024 12:54 PM | |
1 | 03-04-2024 08:49 AM | |
1 | 03-04-2024 08:42 AM |
Online Status |
Offline
|
Date Last Visited |
17 hours ago
|