POST
|
That is the problem I have too. I do not see any ordering data/information, so there I don't know how to solve this.
... View more
01-24-2023
06:11 AM
|
0
|
0
|
319
|
POST
|
@DawnMcCall , no. I had more questions about unexpected behaviour, but most of my questions are not answered...
... View more
01-24-2023
05:46 AM
|
0
|
2
|
324
|
POST
|
We need to build a kind of popup, but completely custom made. I need specific fields that I get from the feature layer by using the PopupTemple: for (var i = 0; i < featurelayer.popupTemplate.fieldInfos.length; i++) {
var fieldname = featurelayer.popupTemplate.fieldInfos[i].fieldName;
} Important is the sort order of the fields and for most feature layers the sort order is the same as set in the AGOL portal. When I use the standard ESRI popup, view.popup, the sort order is for most maps the same, and follows the AGOL portal setting. On some maps I have a different sort order. The sort order in the AGOL portal is the same as the sort order in view.popup, but different in my 'feature layer.popupTemplate.fieldInfos'. I cannot find the reason why it is sometimes different. Any ideas? How can I get the correct AGOL sort order information so I can manage to sort myself instead of following the fieldInfos array natural sort order?
... View more
07-08-2022
05:35 AM
|
0
|
4
|
427
|
POST
|
Working with the old Webmapviewer in AGOL, I was able to create a popupTemplate. I used the information from this popupTemplate to draw the content of my custom fields based on the visibility flag, using the Javascript API. for (var i = 0; i < featurelayer.popupTemplate.fieldInfos.length; i++) { if (featurelayer.popupTemplate.fieldInfos[i].visible)) { "draw field " } } The new Webmapviewer provides a way to define a form, with extra options like 'allow edit' and the sort order of the fields. Can I request this information in the Javascript API and how should this be done?
... View more
03-08-2022
07:34 AM
|
0
|
0
|
216
|
POST
|
My Track implementation has the gotoOverride set to a function. I need this because I want to keep the zoom level the same as the view. Without gotoOverride set to a function that changes the zoom, Track will always zoom deep to the position you are at. I have some HTML INPUT fields, where I want to enter data. If Track is running, and I want to enter data in the INPUT field (keyboard is up), the keyboard on iOS and Android slides down when Track function provides a new coordinate. When I remove this line out of my code: return view.goTo(options.target); , the keyboard stays on the screen but, logically, I miss the 'not zoom' function. How can this be solved? Here is my code: var track = new Track({
view: view,
goToOverride: function(view, options) {
options.target.scale = view.scale;
return view.goTo(options.target);
},
geolocationOptions: {
maximumAge: 0,
timeout: 15000,
enableHighAccuracy: true
},
graphic: new Graphic({
symbol: {
type: "simple-marker",
path: "M 14 -22 L 23.5 0 L 14 -5 L 5.5 0 z",
color: "#005e96",
outline: {
color: "#AAAAAA",
width: 0.75
},
size: 15
},
}),
useHeadingEnabled: false // Don't change orientation of the map
});
view.ui.add(track, "top-left");
... View more
12-23-2021
05:56 AM
|
0
|
0
|
300
|
POST
|
view.on("click", function(event){
view.hitTest(event.screenPoint)
.then(function(response){
if (response.results.length > 0) {
<code>
}
}
}); This piece of code fires when I touch the view. When the view is zoomed in to a very 'deep' level, sometimes a touch on the screen does not give a hit on the graphic. The user has clicked a little to much to the side or above/under the graphic. Is there a way to expand the 'hit buffer', the area around the graphic where this routine fires? Thanks
... View more
07-29-2021
08:06 AM
|
0
|
0
|
258
|
POST
|
Used to pass a graphic into Applyedits to update an Attribute. The code below works with API version 4.16, but fails in 4.18. In 4.18 I have to query for the feature and than pass it into my updatefeature function. Is this an error or did I miss a change in 4.17 or 4.18 API? function updatefeature(graphic, layer) { graphic.attributes.Status = "1"; const edits = { updateFeatures: [graphic] }; applyEdits(edits,layer); } function applyEdits(params,layer) { layer .applyEdits(params) .then(function(editsResult) { if ( editsResult.addFeatureResults.length > 0 || editsResult.updateFeatureResults.length > 0 ) { let objectId; objectId = editsResult.addFeatureResults[0].objectId; else if (editsResult.deleteFeatureResults.length > 0) { } }) .catch(function(error) { errormessage("ArcGIS applyEdits error", error.code + ' | ' + error.name + ' | ' + error.message); }); } Thanks
... View more
02-08-2021
08:59 AM
|
0
|
0
|
326
|
POST
|
Thanks Robert, that's too bad. I hope this will be implemented in the future. Appreciated!
... View more
12-03-2020
08:29 AM
|
0
|
0
|
503
|
POST
|
I know how to change the value of an attribute with the Javascipt API. I use Applyedits(). Now I need to create a new attribute, that has no representation in the Featurelayer in AGOL, through ApplyEdits. When I try this ApplyEdits, the function approves the action, but the newly created attributes are not added to the Featurelayer. How should this be done?
... View more
12-03-2020
08:14 AM
|
0
|
2
|
510
|
POST
|
I have a webpage with a map view filled with features. I need to generate a report in PDF from this webpage, with a PDF-page for every feature. On top of the page, I need a zoomed-in image of the feature on a map. What's the best way to achieve this? I am able to zoom to the features with Javascript commands so I could iterate over all of them and make separate screenshots. But this zooming process takes some time, and would take a lot of time when there are 100+ features. Is there another way? I read about resquesting images from a server. Is there a good example that sets me in the right direction? Thank you.
... View more
10-16-2020
08:02 AM
|
0
|
2
|
592
|
POST
|
How can I add a new attribute in a Featurelayer. I know how to update existing features, but I want to add a new attribute to an existing Feature.
... View more
07-07-2020
02:05 AM
|
0
|
2
|
557
|
POST
|
No, but the single ' solved it. I was misled because I got results without the single quotes on an Attribute Field without a domain list attached. For others with the same issue: where: "animal = dog" works on an Attribute Field which is just a string. where: "animal = dog" fails on an Attribute Field which has a Domain list attached. solution: Always use: "animal = 'dog'" Thank you Robert. Appreciated!
... View more
04-28-2020
07:32 AM
|
0
|
0
|
675
|
POST
|
No, I tried all 3 strings, "nieuw", "gepland" and "uitgevoerd" but all fail.
... View more
04-28-2020
07:00 AM
|
0
|
1
|
675
|
POST
|
Hi Robert, I tried animal = '1', to test if an index number would return values, but it's not the case... My customer set it up in AGOL. I changed it to animals to simplify the question. I made a screenshot of the actual attribute in AGOL. It is a 'status' attribute with a pre-defined string value list (Domain). Sorry it is in Dutch. In AGOL, selecting this attribute in the table, shows a popup with the 3 strings.
... View more
04-28-2020
06:49 AM
|
0
|
3
|
675
|
Title | Kudos | Posted |
---|---|---|
1 | 02-14-2020 10:42 AM |
Online Status |
Offline
|
Date Last Visited |
01-31-2023
09:48 AM
|