|
IDEA
|
It would be nice if the ability to print tables, including the feature menu tables. As I understand it, this is coming to the print widget, but it would be nice to have it with the actual tables. See my solution to this here https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-popup-feature-menu-and-feature-tables/m-p/1367472#M83601. ***** EDIT: 4.34 Still not available. Actions in components, something similar to Experience builder, would be a nice fix. Something like this for feature menus.
... View more
02-15-2024
09:24 AM
|
1
|
1
|
929
|
|
POST
|
When I use a search query, it only loads the first 20 results initially into the feature menu. It then loads the next 20 as I scroll, ect.. So when I go to print the results I only get those results, but I need all results. I understand this is by design with good reason, but does anyone have an idea on how to get around this? See codepen below for an example. https://codepen.io/mbdriscoll/pen/GReBgYd
... View more
02-08-2024
11:53 AM
|
0
|
1
|
970
|
|
POST
|
Here is my solution to printing the popup feature menu. https://codepen.io/mbdriscoll/pen/GReBgYd <html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
<title>Feature Layer Popup Test</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.28/esri/themes/dark/main.css" />
<script src="https://js.arcgis.com/4.28/"></script>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/FeatureLayer",
"esri/Basemap",
"esri/layers/TileLayer",
], (Map,MapView,FeatureLayer,Basemap,TileLayer) => {
const aerial2022 = new Basemap({
baseLayers: [
new TileLayer({
url: "https://www.jfksgis.us/image/rest/services/Aerials/Aerials_2022_cache/MapServer",
title: "Basemap"
}),
],
title: "2022 Aerial",
visible: true,
});
const parcelLayer = new FeatureLayer({
url: "https://www.jfksgis.us/server/rest/services/BaseLayers/JFKSBaseMapLayers/MapServer/3",
title: 'Search Results',
popupTemplate : createPopupTemplate(),
listMode: "hide",
outFields:["*"]
});
const theMap = new Map({
basemap : aerial2022,
layers : [parcelLayer]
});
const theView = new MapView({
container : "viewDiv",
map : theMap,
center : [-95.3804157, 39.2315224],
highlightOptions: {
color: [64, 247, 244],
fillOpacity: 0.2,
},
popup: {
visibleElements: {
closeButton: true,
},
dockEnabled: true,
dockOptions: {
autoOpenEnabled: false,
position: "bottom-right",
breakpoint: false,
buttonEnabled: false,
},
},
});
function createPopupTemplate(){
const urlTax = "https://ks1418.cichosting.com/ttp/tax/Search/search_tax_results.aspx?";
const urlRC = "https://www.jfksgis.us/prc/"
var parInfo = 'https://www.jfksgis.us/JFKSParcelSearch/parcelInformation.html';
var platy = "Replace($feature.Plat_HL, ' ', '%20')"
return{
title:
"<b>Owner:</b> {PartyName_1} " +
"<br /><b>Address: </b> {PropertyAddress}" +
"<br><b>Property Number: </b> {PropertyNumber}" +
"<br><b>Appraisal:</b> ${RP_AprTot}",
outFields: ["*"],
content:
[
{
type: "fields",
fieldInfos:[
{
fieldName: "QuickRefID",
label: "Quick Ref ID",
},
{
fieldName: "ACRES",
label: "Acres",
format:{
places: 2,
}
},
]
},
{
type: "text",
text: "<a class='hyperlinkURL' target='_blank' href=" + parInfo + "?PropertyID={PropertyID}&PID={PID}&PropNum={PropertyNumber}>Parcel Information</a>      <a class='hyperlinkURL' target='_blank' href=" + urlTax + "PID={PID}>Tax Information</a>"
},
{
type: "text",
text: "<a class='hyperlinkURL2' target='_blank' href=https://{expression/platlinked}>View Plat</a>      <a class='hyperlinkURL' href=" + urlRC + "{PropertyNumber}.pdf>Property Record Card</a>",
},
],
expressionInfos:[
{
name: "platlinked",
expression: platy,
},
],
fieldInfos:[{
fieldName: "RP_AprTot",
label: "Total Appraised Value",
format: {
places: 2,
digitSeparator: true,
}
},
],
}
};
function addButtonToContainer() {
const isElementLoaded = async selector => {
while (document.querySelector(selector) === null) {
await new Promise(resolve => requestAnimationFrame(resolve));
}
};
// Wait for the feature menu container to be fully loaded
isElementLoaded('.esri-popup__main-container').then(() => {
console.log("Feature menu container loaded");
let myDiv = document.querySelector('.esri-popup__main-container');
let button = document.createElement('button5');
button.innerText = "Print";
button.style.position = "absolute";
button.style.top = "5px";
button.style.right = "5px";
button.style.zIndex = "9999"; // Set a high z-index value
button.style.backgroundColor = "white";
button.style.color = "black";
button.style.fontWeight = "bold";
button.style.padding = "3px 3px";
button.style.cursor = "pointer";
button.addEventListener("click", printDiv);
myDiv.appendChild(button);
});
}
function printDiv(){
const isElementLoaded = async selector => {
while (document.querySelector(selector) === null) {
await new Promise(resolve => requestAnimationFrame(resolve));
}
}
isElementLoaded('.esri-popup__main-container').then(() => {
console.log("Feature menu loaded");
var printContent = document.querySelector('.esri-popup__main-container').innerHTML;
const modifiedContent = printContent.replace(/Back/g, '').replace(/Owner/g, '<br><br><br>Owner');
printWindow = window.open('', '_blank');
printWindow.document.write(modifiedContent);
printWindow.document.close();
// Wait for a short period before printing
setTimeout(function() {
printWindow.print();
}, 100);
})
};
let query = parcelLayer.createQuery();
query.where = "PartyName_1 LIKE '%driscoll%'";
query.outFields = [ "*" ];
parcelLayer.queryFeatures(query)
.then(function(response) {
// Open the popup with the queried features
theView.openPopup({
features: response.features,
featureMenuOpen: true,
featuresPerPage: 100,
}),
addButtonToContainer();
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
02-07-2024
12:24 PM
|
0
|
0
|
1830
|
|
POST
|
You were correct. I used the graphics not the layer. https://codepen.io/mbdriscoll/pen/GReBgYd
... View more
02-06-2024
07:42 AM
|
0
|
0
|
1750
|
|
POST
|
The layer does have a title, see below. I do add graphics directly, but the popup template is on the feature layer. I will play around with it. Is there a way to just not show the heading at all? \ const parcelLayer = new FeatureLayer({
url: "https://www.jfksgis.us/server/rest/services/BaseLayers/JFKSBaseMapLayers/MapServer/3",
title: "parcel Layer",
popupTemplate : createPopupTemplate(),
listMode: "hide",
outFields:["*"]
});
... View more
02-06-2024
06:22 AM
|
0
|
0
|
1758
|
|
POST
|
Both examples given use the exact same code. function createPopupTemplate(){
const urlTax = "https://ks1418.cichosting.com/ttp/tax/Search/search_tax_results.aspx?";
const urlRC = "https://www.jfksgis.us/prc/"
var parInfo = 'https://www.jfksgis.us/JFKSParcelSearch/parcelInformation.html';
var platy = "Replace($feature.Plat_HL, ' ', '%20')"
return{
title:
"<b>Owner:</b> {PartyName_1} " +
"<br /><b>Address: </b> {PropertyAddress}" +
"<br><b>Property Number: </b> {PropertyNumber}" +
"<br><b>Appraisal:</b> ${RP_AprTot}",
outFields: ["*"],
content:
[
{
type: "fields",
fieldInfos:[
{
fieldName: "QuickRefID",
label: "Quick Ref ID",
},
{
fieldName: "ACRES",
label: "Acres",
format:{
places: 2,
}
},
]
},
{
type: "text",
text: "<a class='hyperlinkURL' target='_blank' href=" + parInfo + "?PropertyID={PropertyID}&PID={PID}&PropNum={PropertyNumber}>Parcel Information</a>      <a class='hyperlinkURL' target='_blank' href=" + urlTax + "PID={PID}>Tax Information</a>"
},
{
type: "text",
text: "<a class='hyperlinkURL2' target='_blank' href=https://{expression/platlinked}>View Plat</a>      <a class='hyperlinkURL' href=" + urlRC + "{PropertyNumber}.pdf>Property Record Card</a>",
},
],
expressionInfos:[
{
name: "platlinked",
expression: platy,
},
],
fieldInfos:[{
fieldName: "RP_AprTot",
label: "Total Appraised Value",
format: {
places: 2,
digitSeparator: true,
}
},
],
}
};
... View more
02-05-2024
12:04 PM
|
0
|
3
|
1783
|
|
POST
|
*edit for more context There seems to be a new item of heading in the search feature menu popup. How do I change that from "Untitled" to something else or to get rid of it completely? 4.21 - Link Example - 4.21 4.28 - Link Example - 4.28
... View more
02-05-2024
09:28 AM
|
0
|
4
|
1857
|
|
POST
|
Are there any examples. When I use featureTable.print() I get the error that it is not a function. The link shows how to print from the export/print widget. I would like to print direct from the custom option newMenuItem to print the table. If I use a newMenuItem to open a new window to print the table using print(), it loses all the grids that make it a table. The HTML2DCanvas seems promising, I will work on testing that out.
... View more
01-11-2024
07:54 AM
|
0
|
0
|
1912
|
|
POST
|
Is there a print option for the popup feature menu? Also is there a print option for feature table? If anyone has done this I appreciate any tips you have.
... View more
01-04-2024
10:30 AM
|
0
|
4
|
1967
|
|
POST
|
Creation Mode is continuous by default. Use single. const sketch = new Sketch({
layer: sketchGraphicsLayer,
view: mapView,
creatioMode: "single"
})
... View more
12-07-2023
12:34 PM
|
0
|
0
|
869
|
|
POST
|
I have two hosted service tables, table 1 is the production for a old and newly created permits. Table 1 uses an index number field for its values. Table 2 has the index number field and a description values field. Is it possible to replace the description values, queried from table 2, to use as the value in replacement for a column in a Feature Table of table 1? Essential I need to users to see the description in that column instead of the index number.
... View more
12-07-2023
12:02 PM
|
0
|
0
|
654
|
|
POST
|
@GKmieliauskas is correct you need to use the IGPResult. Below is how I access python results in the cs. public async Task<IGPResult> ExecuteModel()
{
var progDlg = new ProgressDialog("Running Geoprocessing Tool", "Cancel");
progDlg.Show();
var progsrc=new CancelableProgressorSource(progDlg);
var pathPython = System.IO.Path.GetDirectoryName((new System.Uri(Assembly.GetExecutingAssembly().CodeBase)).AbsolutePath);
pathPython = Uri.UnescapeDataString(pathPython);
System.Diagnostics.Debug.WriteLine(pathPython);
var tool_path = System.IO.Path.Combine(pathPython, @"YourPythonScript.pyt\Tool");
var parameters = Geoprocessing.MakeValueArray();
IGPResult gp_result = await Geoprocessing.ExecuteToolAsync(tool_path, parameters, null, new CancelableProgressorSource(progDlg).Progressor);
return gp_result;
}
... View more
11-13-2023
06:41 AM
|
0
|
1
|
2602
|
|
POST
|
Did you have the same results taking it outside the property object of the sketch widget in 4.28?
... View more
10-30-2023
10:40 AM
|
0
|
0
|
2046
|
|
POST
|
It does seem to work if you use it that way. Must be a bug in 4.28. If you take it out and do this it does not. sketch.visibleElements = ({
createTools:{
circle: false,
rectangle: false,
},
selectionTools :{
"lasso-selection": false
},
creationMode: "update",
undoRedoMenu: false,
settingsMenu: false
});
... View more
10-27-2023
02:04 PM
|
0
|
0
|
2094
|
|
POST
|
sketch.visibleElements={selectionTools:{ "lasso-selection": false }}, is not removing the lasso tool from the menu in 4.28.
... View more
10-27-2023
09:42 AM
|
0
|
5
|
2178
|
| 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 |
Thursday
|