|
POST
|
In my application I am adding a webmap where all layers are turned off. I am looking for a way to track the # of layers toggled on and the id/name of the layers. I have not been able to find an event triggered when the layers are toggled on/off. I am doing this because I want to be able to dynamically update the Swipe widget which I could do if I could find the event that fires when the layer is toggled.I also want to limit the number of layers toggled on at some point possibly. I am working in javascript 4.15. Just a note the layer toggle is not linked to the layer added/removed from map events. Also I am using the layerlist idget to toggle the layers on/off visibility.
... View more
05-15-2020
09:24 AM
|
0
|
2
|
1887
|
|
POST
|
Im trying to do this in an effort to mask labels that are showing where I don't want them. Adding a feature class still doesn't cover the labels but graphic overlay does.
... View more
03-23-2020
10:33 AM
|
0
|
0
|
2474
|
|
POST
|
Hey do you have code I can see to help me try this. I am also having this issue. The only thing is that i'm afraid it won't work for what i need. I am trying to use a graphic overlay to mask data I don't want to show in my export. Turning it into a feature class will likely result in the data not being masked. If I add a feature class over it now the data shows. The data is labels.
... View more
03-23-2020
10:32 AM
|
0
|
0
|
2474
|
|
POST
|
oh, ok. Yea I doubt there is a way because the file is randomly generated it seems. You could possibly set something to clear that directory everytime you set a clip shape and then read the 1 file generated when you set it. Or just read the last file generated in the Temp directory.
... View more
03-12-2020
10:51 AM
|
0
|
0
|
1729
|
|
POST
|
I've been attempting to do something similar and according to the developer this is an issue that they will try to address/fix with 2.6 release. See here
... View more
03-12-2020
10:28 AM
|
0
|
2
|
1729
|
|
POST
|
Charles, Yes those 2 questions were relating to separate things. What I've found now is that the issue we find in the API that you detailed in section 1 where you can not specify a clipping polygon for the map is also a problem in arcpy. Also in reference to your note, neither PreserveArea nor DiscardArea work. At this point I have just decided to just move forward.
... View more
03-11-2020
10:45 AM
|
0
|
0
|
3331
|
|
POST
|
Charles Macleod I was wondering if there was a bug or report number for this issue. Also I found that this doesn't work with arcpy either. How can I go about creating a bug or ticket for that?
... View more
03-11-2020
08:41 AM
|
0
|
2
|
3331
|
|
POST
|
Charles, Thanks for the reply!! I'm wondering, are you saying that using clip as an EditOperation also does not work. I have also tried using that to just clip features i want using my bounding box and it hasn't work. var oid = feature.GetObjectID(); // var Polygon = PolygonCreated before; var cl1 = new EditOperation(); cl1.Name = "ClipFunction"; cl1.Clip(lyr, oid, poly, ClipMode.DiscardArea); cl1.Execute();
... View more
03-03-2020
10:07 AM
|
0
|
0
|
3331
|
|
POST
|
I did some further investigating on this. I created a layout with a clip shape defined and then in my code set it to show the uri of the shape which is the same layer I was trying to set by code and this is what it returned as the URI. CIMPATH=ClipShape/421927d3f9312efaf054b5aa08f76003.dat i'm not sure how it created that URI.
... View more
02-28-2020
08:48 AM
|
0
|
6
|
3331
|
|
POST
|
I am attempting to set a custom definition on a map. I want to use a single feature as the clipping shape. The single feature is its own layer. I am trying to use the definition.CustomClippingShapeURI to set the shape and then setTheDefinition. As you can see below I am using a string for the URI. I got this string after using console to capture the URI using the layer before. "In other words this is how the URI is returned if I define it as a path. This doesn't work though. If I set ClippingMode to ClippingMode.MapExtent that works as it should. var jw3 = mapFrameMap.GetDefinition()
jw3.ClippingMode = ClippingMode.CustomShape;
var lyrOfInterest = mapFrameMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
jw3.CustomClippingShapeURI = "Assessor Map/JWtest";
mapFrameMap.SetDefinition(jw3); I have also tried. var lyrOfInterest = mapFrameMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
var jw3 = mapFrameMap.GetDefinition();
CIMClippingPath path1 = new CIMClippingPath();
path1.Path = lyrOfInterest.URI.ToString() ;
jw3.ClippingMode = ClippingMode.CustomShape;
jw3.CustomClippingShapeURI = path1;
MessageBox.Show(jw3.CustomClippingShapeURI.ToString());
mapFrameMap.SetDefinition(jw3);
This does not work either. Does anybody know how to properly use the CustomShapeURI mode?? Wolfgang Kaiser Uma Harano Charles Macleod - Do any of you have suggestions for using CustomClippingshapeURI for ClippingMode on the map?
... View more
02-27-2020
09:17 AM
|
0
|
9
|
3505
|
|
POST
|
I am looking for a solution to a problem I have found. I want to clip my map to the shape of a feature that is either selected or a layer created with just one feature via query. I have found that when using feature.shape.clone() and then setting my map extent to that of the feature. The extent is slightly larger than the feature. If you open the Map properties in pro and clip to feature it will give a different extent. Here is the code used. LayoutProjectItem layoutItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(item => item.Name.Equals("Standard"));
Layout layout = layoutItem.GetLayout();
MapFrame mapFrame = layout.FindElement("FrameName") as MapFrame;
//Get map
var mapFrameMap = mapFrame.Map;
//Get the specific layer you want from the map
var lyrOfInterest = mapFrameMap.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
using (RowCursor jCursor1 = ExtentFeatureClass.Search(queryFilter, true))
{
while (jCursor1.MoveNext())
{
var RTSNUM = "RTSNumber";
using (Feature feature = (Feature)jCursor1.Current)
{
// Process the feature. For example...
var pin = feature[RTSNUM].ToString();
Geometry geo2 = feature.GetShape().Clone();
var selectionEnvelope2 = geo2.Extent;
mapFrameMap.SetCustomFullExtent(selectionEnvelope2);
mapFrame.SetCamera(selectionEnvelope2); Below is the resulting map with the feature on top. As you can see the map extent is larger than the feature shape. When using clip to shape in the map properties gui this is what I get. There is no data showing outside of the boundary. I need to know f there is a way to achieve this via sdk coding?
... View more
02-25-2020
09:10 AM
|
0
|
1
|
1019
|
|
POST
|
Thanks for the reply, I figured out a way to do what I needed yesterday finally.
... View more
02-21-2020
08:34 AM
|
0
|
0
|
910
|
|
POST
|
I am adding a layout to my project. The layout has 3 MapFrames and each MapFrame contains a map. I am trying to figure out how to select a specific map and make it the MapView.Active.Map? I have not found anyway to do this. I want to do this so I can make changes to the extent of the map and zoom to the extent. You can do this in Pro by simply clicking the map and that will make it active. How do I achieve this through the sdk?.
... View more
02-20-2020
11:49 AM
|
0
|
2
|
1044
|
|
POST
|
ArcGIS Pro 2.5 is out. I saw in the documentation it says this support was added. I upgraded to 2.5 as well as upgrading the sdk. This still does not work. Do you have any information on this? The behavior is the same as it was before. The locator name pops up with a red exclamation point.
... View more
02-19-2020
10:30 AM
|
0
|
0
|
420
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-26-2018 10:22 AM | |
| 1 | 08-16-2018 08:51 AM | |
| 1 | 04-19-2018 02:22 PM | |
| 1 | 02-12-2019 10:47 AM | |
| 1 | 12-11-2018 10:00 AM |
| Online Status |
Offline
|
| Date Last Visited |
09-13-2023
07:38 PM
|