POST
|
Hello, I am trying to partially reuse the example described in this sample: https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection-edits/ But using a GeoJSONlayer instead of a FeatureLayer. In the code snippet below, the "geojson" variable is just a geojson object that contain 25 features (points). When using featurelayer.applyEdits(), it plots all the points on the map. While using geojsonlayer.applyEdits(), it just plots either 1 point, sometimes 2 points. When inspecting the "console.log(editsResult)" in both cases 25 items have been added ("editsResult.addFeatureResults" property), but with geojsonlayer the objectids are the same Any idea why this happens? Thanks! for (feature of geojson.features){
let point = {
type: "point",
longitude: feature.geometry.coordinates[0],
latitude: feature.geometry.coordinates[1]
}
let pointGraphic = new Graphic({
geometry: point
})
addFeatures.push(pointGraphic)
}
geojsonlayer.applyEdits({
addFeatures:addFeatures
}).then((editsResult) => {
console.log(editsResult)
}) console.log(editResults): {
"addFeatureResults": [
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
},
{
"objectId": "__OBJECTID-17f26c9a7de",
"globalId": null,
"error": null
}
],
"updateFeatureResults": [],
"deleteFeatureResults": [],
"addAttachmentResults": [],
"updateAttachmentResults": [],
"deleteAttachmentResults": []
}
... View more
02-23-2022
05:38 AM
|
0
|
1
|
586
|
POST
|
Hello Is it possible to change the URL property of a GeoJSONLayer and .refresh(), so that it fetches a new set of data, overwrites the previous one and displays it on the map? I need a different URL, not just a different query string, which I know it is possible by using .createQuery() .queryFeatures(). Thanks
... View more
02-22-2022
01:41 PM
|
0
|
1
|
936
|
POST
|
Thanks Joshua, I found a null value in one of the fields
... View more
09-22-2016
08:41 AM
|
0
|
1
|
877
|
POST
|
Hello, When using this function: arcpy.da.FeatureClassToNumPyArray(featureClass, "*") With an asterisk in the second parameter I get this error in Pyscripter: TypeError: long() argument must be a string or a number, not 'NoneType' While when I put the name of a field or a some fields I have no problem. According to ESRI help, this parameter can be populated with: A list (or tuple) of field names. For a single field, you can use a string instead of a list of strings. Or use an asterisk (*) instead of a list of fields if you want to access all fields from the input table. What am I doing wrong? Thanks
... View more
09-22-2016
05:52 AM
|
0
|
5
|
2295
|
POST
|
Thanks Dan, I will try the UpdateCursors functionality. In my case I have a Z-enabled feature class (points) whose Z values are 0. This same table has a numeric field with the elevation values.
... View more
09-22-2016
05:28 AM
|
0
|
1
|
455
|
POST
|
I would like to know if is it possible to pass z-values stored in a field (double) to the field Shape in a Z-enabled Feature Class preferably using the Field Calculator. If yes, could you post the expression that it is needed? I am using ArcGIS Desktop 10.1. Thanks
... View more
09-22-2016
12:47 AM
|
0
|
3
|
1345
|
POST
|
Thanks Robert! For addressing the issue and also for the speed Great Arnau
... View more
10-22-2014
02:33 AM
|
0
|
0
|
460
|
POST
|
Anthony, Both the shape and the objectid field are turned on in my layer. regards, Arnau
... View more
10-20-2014
06:00 AM
|
0
|
0
|
460
|
POST
|
Hello, When I search for features (points) using the eSearch widget I get the correct results in the widget, but I don't get the Features Selected number. Instead it says error #1009 (see image). This only happens with the Graphical Search. When I use the Text Search I get the Features Selected number correct. In addition, if I first use the Text Search and later I use the Graphical Search then I don't get the error. Any suggestions? I am using version 3.6.9 Thanks, Arnau
... View more
10-20-2014
03:27 AM
|
0
|
5
|
2078
|
POST
|
Hello, I have a hosted feature service that represents the 3 different floors of a building. I would like to filter the floors as this example: http://resources.arcgis.com/en/help/flex-viewer/live/index.html?config=apps/config-query.xml I have configured a Query widget, filter by "floor". It can query and also get the result in the query widget. But it doesn't render the result set on the map (In the example the police stations "disappear") This is the xml: <?xml version="1.0" ?> <configuration label="Floors"> <layer>http://services.arcgis.com/1WXsSdZFzziTTcic/arcgis/rest/services/Facilities_Floors_StGilles/FeatureServer/0</layer> <titlefield>FLOOR</titlefield> <fields all="false"> <field name="FLOOR" alias="Floor number"/> <field name="DESCRIP" alias="description"/> </fields> <filterfield> <name>FLOOR</name> <alias>Filter by Floor (Example: 1,2,3 )</alias> </filterfield> <linkfield></linkfield> <refreshrate></refreshrate> <zoomscale></zoomscale> <query>1=1</query> <symbols><simplefillsymbol alpha="0"><outline alpha="0"></outline></simplefillsymbol></symbols> </configuration> Can anyone help? Thanks
... View more
05-28-2014
01:24 AM
|
0
|
1
|
1939
|
POST
|
Hi, I would like to use a WMS as a basemap in AGOL. This WMS have 5 different layers, but I only want one of them to be used as a basemap. When I add it as a basemap, AGOL automatically adds the 5 layers. Is it possible to only select the layers I want? thanks Arnau
... View more
10-30-2013
06:08 AM
|
0
|
2
|
553
|
Online Status |
Offline
|
Date Last Visited |
02-23-2022
08:45 AM
|