|
POST
|
I am out now for a couple days but I will dig into this on Monday, but do you think my conditional statement around it affects something. your canceledit is the only statement in the event. I have 3 conditionals and a try catch. But my cancel edits are the last statements run? Long shot guess without being able to strip my code down to what you have here. again this isn’t happening in my delete event.
... View more
01-24-2020
04:46 PM
|
0
|
0
|
1956
|
|
POST
|
I am on server 10.5.1. you got your code to undo the vertex edit in the on change event?
... View more
01-24-2020
04:08 PM
|
0
|
2
|
1956
|
|
POST
|
The datasource if a featureservice and it currently works in 2.2.3 that is in our Production environment. I am moving to 2.4.3
... View more
01-24-2020
11:50 AM
|
0
|
5
|
1956
|
|
POST
|
I can seem to figure out why this doesn't work in my code. I am unable to upgrade until I allow users to either cancel their changes or stop them from performing certain changes. I upgraded my arcgis pro sdk from 2.2.3
... View more
01-24-2020
06:52 AM
|
0
|
0
|
1956
|
|
POST
|
I am in the process of upgrading my users to the newest version of ArcGIS Pro 2.4.3 and testing my code. It appears that CancelEdit is not performing as expecting in the OnRowChangeEvent? It seems to work in OnRowDeleteEvent but not in OnRowChange? else if (ConditionTrue) //rollback
{
//CANCEL the Redraw Change
args.CancelEdit(() => ChangeError("Changes Not Allowed!", "Parent Shape Cannot be changed"));
} I also put in simply args.CancelEdit() and that failed too
... View more
01-23-2020
08:26 AM
|
0
|
16
|
3307
|
|
POST
|
I am using a service as the datasource. It only happens when I use "OBJECTID" as the only subfield. If I use "GlobalID" for instance, I don't have any problems either. I have switch all of my subfield requests from "OBJECTID" to "GlobalID, OBJECTID" until I can figure this out.
... View more
01-06-2020
12:23 PM
|
0
|
1
|
1371
|
|
POST
|
I am in the process of upgrading my users from ArcGIS Pro 2.2.3 to 2.4.3. I have run into this issue. I have a function that returns only the ObjectIDs for a where clause applied to a basicfeaturelayer. I do this in order to get a quick list of features based on a simple where clause. I just return the SubFields of OBJECTID in the query filter to optimize the efficiency of the return rowcursor. When I moved to ArcGIS Pro 2.4.3, the queryfilter subfields value of "OBJECTID" seems to not work any longer. In fact, the resulting rowcursor seems to return all records. In order to get the query to work correctly I added shape to the subfields value and now the query works again. "Shape, OBJECTID". However, I think this might be affecting my efficiency as I only need the OBJECTIDS. Is this a bug or is there a different way to return the rowcursor of just the subfields of ObjectID? BasicFeatureLayer searchLayer = GetBasicFeaturLayer(layerName);
//This subfields fails in 2.4.3 I cant use just objectid in the subfield after the upgrade
//string inSubFields = "OBJECTID";
//This subFields works, i had to add an additional field in order for this to work in //2.4.3
string inSubFields = "Shape, OBJECTID";
var queryFilter = new QueryFilter
{
WhereClause = string.Format("{0} IN ('{1}')", inIDFieldName, ContainsClause);,
SubFields = inSubFields
};
// apply the spatial filter to the feature layer in question
RowCursor rowCursor = null;
rowCursor = searchLayer.Search(queryFilter);
//*******************************
//This loop fails after the upgrade from 2.2, when i just use
// objectid in the subfield the rowcurser seems to return every feature
//*******************************
//Add all the resulting objectIDs to a list to later load or use
while (rowCursor != null && rowCursor.MoveNext())
{
if (rowCursor.Current != null)
{
featuresByIDList.Add(rowCursor.Current.GetObjectID());
}
}
... View more
01-03-2020
10:54 AM
|
1
|
4
|
1455
|
|
POST
|
I need to find a way to remove old Layouts from my project if they were added before a certain date. I create layout templates and add them to my addin. These templates are then used to print a map, however, after it is loaded I stays with the project. I do want the layout to stay with the project (as load times are much faster), but when I update the Layout I want to remove the existing template if it is before a certain date that I maintain. I need to be able to get the date the existing Layout was added to the Projects catalog, then I will remove it based on this date if it is old. //Remove the old templates that might be out of date
foreach (LayoutProjectItem layoutTemplate in Project.Current.GetItems<LayoutProjectItem>())
{
//NEED LOGIC HERE TO SEE IF THE layoutTemplate IS BEFORE a DATE
Project.Current.RemoveItem(layoutTemplate as IProjectItem);
}
... View more
12-05-2019
02:21 PM
|
0
|
3
|
929
|
|
POST
|
I am creating a number of kml layers and adding them async to my map. The problem is, is that I can't figure out how to create their legend info so that they can be displayed on my legend to the map. I want to do something like this, but can't figure out how to get anything to work at all. i know I need to add to the legendinfos of the layer or the map itself, but hit a roadblock. This append below doesn't work at all, but shows what I am trying to do. var newKMLLayer = ArcGISRuntimeEnvironment.createObject("KmlLayer",
{
dataset: newKMLDataset,
id: kmlLayer,
description: inName,
layerId: "LayerID",
name: inName,
maxScale: 0,
minScale: 0,
visible: false
});
newKMLLayer.legendInfos.append({
"layerName": inName,
"symbolURL": "URL"
})
mapViewFieldSelected.map.operationalLayers.append(newKMLLayer)
... View more
11-05-2019
02:16 PM
|
0
|
1
|
692
|
|
POST
|
The opacity doesn't work for what we need. We need to examine a layer by visualizing the difference between one layer for say "Day 1" and the same layer on "Day 10". The slider allows me to move the layer back and forth. Opacity doesn't work very well with this as the layers are essentially heat maps, and by changing opacity the value of the Heat map doesn't work very well. I know you can just turn the layer off and on and examine the differences, My layers are on a hidden popup, so it wouldn't work very well to turn them off and on. I am thinking about making just a quick button that when pressed, will turn off the topmost layer. Then when you release it will go back to on. This will allow a user to see the differences easily by the naked eye.
... View more
10-10-2019
10:28 AM
|
0
|
0
|
670
|
|
POST
|
I have been working with the KMLGroundOverlay sample and it has helped me a lot to get all of my image overlaid on my map. But now I want to incorporate a Swipe Layer slider instead for the color slider like is done in the below sample. Instead of changing the opacity of the top most layer, I want it to hide the layer from right to left. This is done a lot with time images, so you can see what was there before. How do I mask the topmost layer from right to left according to the percent value on the slider? MapView {
id: sceneView
anchors.fill: parent
Rectangle {
anchors.fill: slider
radius: 5
}
Slider {
id: slider
anchors {
left: parent.left
top: parent.top
margins: 10
}
from: 0
to: 1
value: 1
stepSize: 0.1
onValueChanged: {
// I WANT TO HIDE THE OVERLAY FROM RIGHT TO LEFT BASED ON VALUE
groundOverlay.color = Qt.rgba(0, 0, 0, value);
}
}
Map {
BasemapImagery {}
// Create a KML Layer
KmlLayer {
id: kmlLayer
// Create a KML Dataset
KmlDataset {
// Create a Ground Overlay by assigning an icon and geometry
KmlGroundOverlay {
id: groundOverlay
rotation: -3.046024799346924
KmlIcon {
url: "https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/Qt_logo_2016.svg/1200px-Qt_logo_2016.svg.png"
}
Envelope {
id: env
xMin: -123.066227926904
yMin: 44.04736963555683
xMax: -123.0796942287304
yMax: 44.03878298600624
SpatialReference {
wkid: 4326
}
}
}
}
// set viewpoint to the ground overlay
onLoadStatusChanged: {
if (loadStatus !== Enums.LoadStatusLoaded)
return;
const vp = ArcGISRuntimeEnvironment.createObject("ViewpointCenter", {
center: env.center,
targetScale: 10000
});
sceneView.setViewpoint(vp);
}
}
}
}
... View more
10-09-2019
01:26 PM
|
0
|
2
|
727
|
|
POST
|
That worked. I was missing one thing that fixed it initRootNode var newKMLDataset = ArcGISRuntimeEnvironment.createObject("KmlDataset", {initRootNode: newKmlGroundOverlay});
... View more
10-08-2019
09:14 AM
|
0
|
0
|
875
|
|
POST
|
I am adding a KML Layer to my map from a URL which I need to retrieve asynchronously. When I retrieve this URL, I attempt to add the KML Layer to an existing map, but it never seems to appear. If I know the URL before the map loads, I am able to add the KMLLayer like normal, but when trying to add to a map that already exists, it never appears? This Works on initial load of the map as expected KmlLayer {
KmlDataset {
KmlGroundOverlay {
id: groundOverlay
KmlIcon {
url: kmlUri
}
Envelope {
id: envelopeCHI
xMax: kmlxMax
yMin: kmlyMin
xMin: kmlxMin
yMax: kmlyMax
spatialReference: SpatialReference.createWgs84()
}
}
}
} When trying to add dynamically to an already loaded map, nothing seems to be added? I can even hardcode the url and envelope values with known URL and envelope and it still doesn't work. function addKMLLayer()
{
var newKmlIcon = ArcGISRuntimeEnvironment.createObject("KmlIcon");
newKmlIcon.url = kmlUri
var newEnvelope = ArcGISRuntimeEnvironment.createObject("Envelope");
newEnvelope.id = envelopeCHI
newEnvelope.xMax = kmlxMax
newEnvelope.yMin = kmlyMin
newEnvelope.xMin = kmlxMin
newEnvelope.yMax = kmlyMax
newEnvelope.spatialReference = SpatialReference.createWgs84()
var newKmlGroundOverlay = ArcGISRuntimeEnvironment.createObject("KmlGroundOverlay", {newKmlIcon, newEnvelope });
var newKMLDataset = ArcGISRuntimeEnvironment.createObject("KmlDataset", {newKmlGroundOverlay});
var newKMLLayer = ArcGISRuntimeEnvironment.createObject("KmlLayer", {newKMLDataset});
map.operationalLayers.append(newKMLLayer)
}
... View more
10-08-2019
07:04 AM
|
0
|
2
|
949
|
|
POST
|
Lucas, thank you for all of your help. I figured it out. I couldn't understand why the sample KML overlay worked, but not in my application. I looked at everything including the ArcGIS Runtime License set in appinfo.json. It turns out that the sample didn't have this set, well on the development machine, you don't need a license. I had my license on my app set to runtimelite, as that is all i have ever needed to deploy. I set the license to nothing and I got the overlay to work. I then set it to the runtimeadvanced and it also worked. Thank you for taking the time to look into this for me and I hope this helps someone else that cant understand why the sample works and their own app does not.
... View more
10-03-2019
06:31 AM
|
1
|
0
|
3122
|
|
POST
|
What are your imports settings at the top of your file? I can't get your code to work. It shows nothing for me? Does this have to be in 100.7?
... View more
10-02-2019
12:41 PM
|
0
|
0
|
3122
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-23-2018 06:49 AM | |
| 1 | 08-02-2023 08:28 AM | |
| 1 | 01-03-2020 10:54 AM | |
| 1 | 11-30-2017 06:41 AM | |
| 1 | 08-20-2018 01:10 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-22-2025
04:33 AM
|