|
POST
|
ESRI Icons const directionalPad = new DirectionalPad({
view: view
icon: "esri-icon-handle-horizontal",
})
... View more
04-05-2024
06:46 AM
|
0
|
3
|
2119
|
|
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
|
2672
|
|
POST
|
Sorry, I have not tried either one of those things.
... View more
03-08-2024
08:01 AM
|
0
|
1
|
2240
|
|
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
|
2247
|
|
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
|
2260
|
|
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
|
1129
|
|
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
|
2699
|
|
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
|
1085
|
|
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
|
1880
|
|
POST
|
You need to do this using arcade in the expressionInfos.
... View more
03-04-2024
08:42 AM
|
1
|
3
|
1880
|
|
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
|
1048
|
|
POST
|
You need to change the opacity of the class esri-legend__symbol.
... View more
02-28-2024
02:12 PM
|
0
|
2
|
1054
|
|
POST
|
Is there a way to change the default size of a rectangle sketch single click? The size seems to be determined by the scale you are currently viewing the map at, the more you zoom in the smaller the single click rectangle is. For now I will default to freehand mode but, if possible, it would be nice to be able to change the size and behavior of a single click.
... View more
02-27-2024
09:04 AM
|
0
|
0
|
695
|
|
POST
|
I am trying to update some code, getting rid of deprecated items. I am trying to change my feature table selections from selectRows() to highlightIds.add(), but I am having trouble. I am guessing I am needing to add some more lines of code getting graphics first? Any help will be appreciated. https://codepen.io/mbdriscoll/pen/GReBgYd?editors=1000 parcelLayer.queryFeatures(query)
.then(function(response) {
// Open the popup with the queried features
theView.openPopup({
features: response.features,
featureMenuOpen: true,
featuresPerPage: 100,
});
addButtonToContainer();
if(response.features.length === 0){
alert("Search query found no results.");
return
}else{
for(let iii=0; iii < response.features.length; iii++){
//console.log(response.features[iii])
//featureTable.selectRows(response.features[iii]);
featureTable.highlightIds.add(response.features[iii]);
console.log(featureTable.highlightIds.add(response.features[iii]))
featureTable.filterBySelection();
}
};
});
... View more
02-26-2024
07:18 AM
|
0
|
1
|
895
|
|
POST
|
Print export is not including any labels. I set forceFeatureAttributes to true. What am I missing? // Style the label
var labelClass = {
symbol: {
type: "text", // autocasts as new TextSymbol()
color:[254, 252, 203], //"white",//[230, 224, 0],
haloColor: "Black",
haloSize: 2,
lineWidth:55,
font: {
// autocast as new Font()
family: "Avenir Next LT Pro Medium",
size: 8,
weight: "bold"
}
},
labelExpressionInfo: {
expression: singleLine
},
labelPlacement: "always-horizontal",
minScale: 7500
};
parcelLayer.labelingInfo = [labelClass];
... View more
02-15-2024
01:43 PM
|
0
|
0
|
665
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 1 | 03-23-2026 08:11 AM | |
| 1 | 03-23-2026 07:55 AM | |
| 7 | 03-18-2026 12:15 PM | |
| 1 | 03-11-2026 07:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|