POST
|
I believe I found it: <esriUI:MapView x:Name="myMapView" Tapped="{x:Bind Path=ViewModel.myMapView_IdentifyFeature}" IsDoubleTapEnabled="True"/> Now When I put this in My ViewModel file I get an error: myMapView.SetViewpoint(new Viewpoint(foundLayer.FullExtent)); Says myMapView does not exist in current context.
... View more
02-08-2022
05:53 PM
|
0
|
0
|
574
|
POST
|
Ok thank you Nathan. I put that code in and it says the map doesn't contain a definition for SetViewPoint. I guess I have to define ViewPoint somewhere?
... View more
01-31-2022
03:08 PM
|
0
|
2
|
591
|
POST
|
Hello, So I have a project I inherited and I want to build a zoom extent button for each TPK that is loaded. I have created the zoom button next to the delete button for each loaded TPK and the delete option works but the zoom extent does not. I was wondering if I could get a little help because I cannot seem to get the zoom extent property. Below is the code: public void ZoomToLayer(bool fromSelection) { if (esriMap != null && _selectedLayer != null && fromSelection) { // Get selected layer MapPageLayers subFile = (MapPageLayers)_selectedLayer; string localLayerPath = Path.Combine(accessData.ProjectPath, subFile.LayerName); //For tpks if (!subFile.LayerName.Contains("sql")) { Layer foundLayer = null; // Find the layer from the image layer foreach (Layer l in esriMap.AllLayers) { if (l.Name == subFile.LayerName.Split('.')[0]) { foundLayer = l; break; } } if (foundLayer != null) { //Zoom to extent of Layer esriMap.Basemap.Item.Extent = foundLayer.FullExtent; } //Reset layer and layer flyout _selectedLayer = string.Empty; } else { //Zoom to extent of Layer esriMap.Basemap.Item.Extent = foundLayer.FullExtent; //Reset layer and layer flyout _selectedLayer = string.Empty; } } } } Now This code works for deleting a tpk map layer but I tried to get the zoom extent feature of the layer and cannot because I am not an expert coder at all. Does anyone know how to do this? The code in red is the code that gives me issues.
... View more
01-26-2022
05:27 PM
|
0
|
4
|
661
|
POST
|
Hello, I created an ArcMap Add-in where the user specifies a point file and selects the strike and dip fields. I also have a field where the user selects a DEM file and points to the Z values. Has anyone here ever used code to create a 3D plane using these 2 file types, or know of an "easy" way to code it? I'm thinking of using matrix algebra but not sure how I would go about doing so. Thank you
... View more
10-27-2016
12:11 PM
|
0
|
0
|
585
|
POST
|
Hey Freddie. I have tried them now and now I am having an error. If I use IRasterLayer then I cannot use IRaster2 or IRasterBand. If I remove IRasterLayer then I get an error on IRaster2 or IRasterBand saying I cannot convert type string to the IRaster2 or IRasterBand. I know I get the same value for map.get_Layer(i).name and cboDEM.text using messageboxes when I click the right file so it goes inside the loop. if (map.get_Layer(i).Name == cboDEM.Text) { IRasterLayer pRasLayer = map.get_Layer(i) as IRasterLayer; IRaster2 pRaster = map.get_Layer(i).Name;
... View more
09-09-2016
10:16 AM
|
0
|
1
|
527
|
POST
|
I am playing around with a raster and I want to find out if the fieldcount property can be found in any of the Raster interfaces using C#? I have been unable to find it when searching IRasterLayer, IRaster..... Thank you
... View more
09-08-2016
04:53 PM
|
0
|
3
|
1571
|
POST
|
Hello thanks for the response. I could not find what I was looking for on those sites.
... View more
09-07-2016
08:11 PM
|
0
|
1
|
743
|
POST
|
I have a combo box that has the layers from the TOC loaded into them. Now I want to be able to select the layer (usually shapefiles) and load the fields but im a newbie when it comes to ArcObjects. This is what I have which i know is wrong: private void cboLocation_SelectedIndexChanged(object sender, EventArgs e) { cboRegion.Items.Clear(); cboLevel.Items.Clear(); PointLayers selectedPntLayer = cboLocation.SelectedItem as PointLayers; IFeatureLayer selectedFL = selectedPntLayer.pointLayer as IFeatureLayer; IFeatureClass getInputFC = selectedFL.FeatureClass ; for (int i = 0; i < getInputFC.Fields.FieldCount; i++) { cboRegion.Items.Add(getInputFC.Fields.get_Field(i).Name); cboLevel.Items.Add(getInputFC.Fields.get_Field(i).Name); } } I get an error at the IFeatureLayer line saying: "Object reference not set to an instance of an object." Im sure it is easy to fix but im a newbie, anyone out there know how to fix this?
... View more
08-26-2016
01:13 PM
|
0
|
4
|
2031
|
POST
|
hello, Using c# I have an open dialog object in my form where the user selects an input GIS file. Once a file is selected, I have a combo box object that I want to load all the field names from that input GIS file into so the user can select the required field for analysis. How would I go about doing that? Thank you.
... View more
06-13-2016
05:57 PM
|
0
|
2
|
2852
|
POST
|
I was given a form (GeoForm) in Visual Studio and I have just created a button (LoadGeo that I created in ArcMap. I want the button to load this form in ArcMap using c# so I was wondering what do I type in between the brackets below to do this? protected override void OnClick() { }
... View more
06-10-2016
03:57 PM
|
0
|
2
|
2734
|
POST
|
ok thanks Ken. I will install community 2015 now and see how that works. Have you tried programming with ArcObjects in the community version?
... View more
05-18-2016
01:33 PM
|
0
|
1
|
363
|
POST
|
Hello, This is my first time here and I am about to embark on a project that involves creating tools and linking with dll's for ArcGIS desktop use so I was wondering what is the best FREE version of Visual studio I should use with the ArcObjects SDK? thanks
... View more
05-18-2016
12:10 PM
|
0
|
3
|
2148
|
POST
|
thanks everyone. I tried everything on here and the first thing that worked was startswith() so thanks everyone it works perfectly now!
... View more
03-17-2016
05:04 PM
|
0
|
0
|
788
|
POST
|
hello, I am using an update cursor in my python script to go through my table records and I want to assign the same value to all the universities that start with "University of". Here is an example of what I want to do: if row[0] == "Boston College": [code here] elif row[0] == "University of *": [code here] else: I thought the * was the wildcard but all my records that have "University of" as the prefix in a record do not have any values in them, whereas Boston College does.
... View more
03-17-2016
12:32 PM
|
0
|
8
|
2472
|
Online Status |
Offline
|
Date Last Visited |
02-09-2022
06:46 PM
|