|
POST
|
Hello everybody, I would like to get X and Y on the pop up when user search a feature. I don't know if it's better to do this with Arcade expressions or with a event function. With Arcade, I have a little problem on the script on the $feature X. <script id="X">
function MetersToLon(x) {
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (x HERE THE PROBLEM / originShift) * 180.0;
return Round(lon, 3);
return MetersToLon(Round(Geometry($feature).X, 6));
}
</script> Could someone help me on this please?
... View more
01-30-2023
04:01 AM
|
0
|
2
|
1443
|
|
POST
|
I would like to do something like that https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=popup-editaction with the results in the expand block.
... View more
01-24-2023
05:26 AM
|
0
|
2
|
1992
|
|
POST
|
Thank you @Sage_Wall , it's like that! I will take some time to test and I tell you if it 's ok
... View more
01-24-2023
05:25 AM
|
0
|
0
|
1993
|
|
POST
|
Hello everybody, I looking for displaying results from a query to a new box in my map. The user could see the box and could expand it if he wants. All I find on internet is how to make a query and display the results on the map. I just want to get some attributes and display it. I don't want graphics. I found this post https://stackoverflow.com/questions/42062363/display-attribute-value-from-arcgis-layer-to-html-textbox but it was in 2017! Thank you for your help!
... View more
01-24-2023
03:30 AM
|
0
|
6
|
2036
|
|
POST
|
Thank you @jcarlson , i found the solution 🙂 query.where = "Edited > CURRENT_TIMESTAMP - 30" Thank you
... View more
01-24-2023
03:22 AM
|
0
|
0
|
1639
|
|
POST
|
Hello everybody, I would like to query on the editor tracking attributes, especially last_editor_date on the last month. I tried but I Doesn't wok, I think I'm very far away the answer! I didn't find anything on internet, it would be nice if someone could help me. Thank you!! //Assign a where clause, returnGeometry, and outFields to the Query class.
let query = fl_prod.createQuery();
query.where = ???, //The where clause
query.returnGeometry=false, //The boolean property for returning the geometry
query.outFields= ["IDARRET", "NOMARRET","MNLP_HASTUS","EDITED"] //The fields to return from the query
fl_prod.queryFeatures(query)
.then(function(response){
let stats = response.features[0].attributes;
console.log(stats.Edited);
});
... View more
01-23-2023
03:43 AM
|
0
|
2
|
1688
|
|
POST
|
So, unfortunetaly, I didn't find antyhing about theses borders. It's possible to fit the content but it doesn't work like I Want ! If someone knows about these things, it would be very nice 🙂 Thank you!
... View more
01-16-2023
01:54 PM
|
0
|
0
|
1282
|
|
POST
|
Thank you @DavidSolari . With the link https://github.com/Esri/arcgis-js-api/blob/4master/assets/esri/themes/base/widgets/_Popup.scss, I found solutions. Now, I miss the border, i didn't find for now. I 'm still searching...
... View more
01-16-2023
07:37 AM
|
0
|
0
|
1287
|
|
POST
|
Hello , I would like to change my pop up style and I'll trying to change the font and it doesn't work. I'll working with the sassy theme. Like you can see, the background color change but not the center and I don't know how to change the font. I didn't find the font color option. Thank you for your help! .sassy-theme .esri-widget
.sassy-theme .esri-widget--button,
.sassy-theme .esri-menu,
.sassy-theme .esri-popup,
.sassy-theme .esri-popup__main-container{
background-color: rgb(27, 27, 9);
}
.sassy-theme .esri-widget.esri-search,
.sassy-theme .esri-search .esri-widget--button ,
.sassy-theme .esri-widget .esri-menu
{
background-color: rgb(198, 198, 63);
color: rgb(121, 5, 50);
font-size:larger;
font-family: 'Montserrat';
}
.sassy-theme .esri-attribution
.sassy-theme .esri-attribution a
.sassy-theme .esri-popup .esri-attribution
.sassy-theme .esri-popup .esri-popup__pointer-direction,
.sassy-theme .esri-popup .esri-popup__button,
.sassy-theme .esri-button,
.sassy-theme .esri-input,
.sassy-theme .esri-widget a
... View more
01-13-2023
08:05 AM
|
0
|
3
|
1319
|
|
POST
|
Hello, i would like to know if there is a way to edit one feature on the layer visible on the app whre there's n layers? I have 3 layers , i put the edit widget on the pop up and i would like to edit for each layer. My script works for one layer, I don't know how to do when there's n layers on the app. I 'm trying with a function with an IF on the visibility of the layer but i doesn't work. Here's my code: view.when(() => {
function test(){
if (fl_proj1.visible=true) {
// Create the Editor with the specified layer and a list of field configurations
editor = new Editor({
view: view,
// Hide the snapping controls as it is not needed for this specific workflow
visibleElements: { snappingControls: false },
container: document.createElement("div"),
layerInfos: [
{
layer: fl_proj1,
formTemplate: {
// autocasts to FormTemplate
elements: [
// autocasts to FieldElement
{
type: "field",
fieldName: "IDARRET",
label: "IDAP",
editable: false
}
]
}
}
]
});
}
}
// Execute each time the "Edit feature" action is clicked
function editThis() {
// If the Editor's activeWorkflow is null, make the popup not visible
if (!editor.activeWorkFlow) {
view.popup.visible = false;
// Call the Editor update feature edit workflow
editor.startUpdateWorkflowAtFeatureEdit(
view.popup.selectedFeature
);
view.ui.add(editor, "top-right");
}
// Remove the editor widget from the display when the state of the editor's viewModel is "ready" and re-add the popup. Ready state indicates that the initial editor panel displays and is ready for editing.
// The editor displays a panel to select a feature to update if the user "backs" out of the current edit workflow. This is not needed in this specific workflow as the feature is already selected from the popup. The "ready" state indicates that this initial editor panel is active and was activated via the "back" button. In this example, we remove the editor from the view and replace it with the popup.
reactiveUtils.when(
() => editor.viewModel.state === "ready",
() => {
// Remove the editor and open the popup again
view.ui.remove(editor);
view.popup.open({
fetchFeatures: true,
shouldFocus: true
});
}
);
}
// Event handler that fires each time an action is clicked
view.popup.on("trigger-action", (event) => {
if (event.action.id === "edit-this") {
editThis();
}
});
});
// Watch when the popup is visible
view.popup.watch("visible", (event) => {
// Check the Editor's viewModel state, if it is currently open and editing existing features, disable popups
if (editor.viewModel.state === "editing-existing-feature") {
view.popup.close();
} else {
// Grab the features of the popup
features = view.popup.features;
}
});
featureLayer.on("apply-edits", () => {
// Once edits are applied to the layer, remove the Editor from the UI
view.ui.remove(editor);
// Iterate through the features
features.forEach((feature) => {
// Reset the template for the feature if it was edited
feature.popupTemplate = template;
});
// Open the popup again and reset its content after updates were made on the feature
if (features) {
view.popup.open({
features: features
});
}
// Cancel the workflow so that once edits are applied, a new popup can be displayed
editor.viewModel.cancelWorkflow();
}); Here's a capture a the widget and the 3 layers with the visibility. I don't know if it's clear ! Thank you for your help.
... View more
12-26-2022
06:14 AM
|
0
|
1
|
1026
|
|
POST
|
Hello, I would like not display the attchments when I Edit a feature. The Esri script works like a charm https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=popup-editaction but I don't find the way to hide attchments. Any Ideas? Thank you everybody and merry Christmas!
... View more
12-25-2022
06:27 AM
|
0
|
2
|
1027
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-26-2023 05:43 AM | |
| 1 | 10-26-2023 12:59 AM | |
| 1 | 02-15-2023 07:06 AM | |
| 1 | 11-09-2020 08:07 AM |