POST
|
Here is the XAML for my custom page which defines the '_geometryCollectionControl': <ArcGISMobileApplication:MobileApplicationPage x:Class="WCNS.Mobile.Pages.CollectFeatureGeometryPage" xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:ArcGISMobileApplication="clr-namespace:ESRI.ArcGIS.Mobile.Client;assembly=ESRI.ArcGIS.Mobile.Client" xmlns:ArcGISMobileControls="clr-namespace:ESRI.ArcGIS.Mobile.Client.Controls;assembly=ESRI.ArcGIS.Mobile.Client"> <Grid> <ArcGISMobileControls:GeometryCollectionControl x:Name="_geometryCollectionControl"></ArcGISMobileControls:GeometryCollectionControl> </Grid> </ArcGISMobileApplication:MobileApplicationPage> Then in the code behind: partial class CollectFeatureGeometryPage : MobileApplicationPage { public CollectFeatureGeometryPage(GeometryCollectionViewModel viewModel) this._geometryCollectionControl.GeometryCollectionViewModel = viewModel; }
... View more
10-29-2014
02:15 AM
|
0
|
2
|
575
|
POST
|
Hi Matt, I ended up creating my own MobileApplicationPage sub-class and adding a ESRI.ArcGIS.Mobile.Client.Controls.GeometryCollectionControl to it. This provides all the methods needed to get a geometry. I couldn't work out how to remove the geometry collection methods panel from the left hand side though. As the API documentation is missing the 'ESRI.ArcGIS.Mobile.Client' assembly I found the JetBrains dotPeek freeware an essential tool to digging through the 'ESRI.ArcGIS.Mobile.Client' and 'ESRI.ArcGIS.Mobile' dlls and working out what UI components are available and also how the code works underneath. Here is some code: // This code creates the view model Feature feature = new Feature(featureType, null); GeometryCollectionViewModel model = new GeometryCollectionViewModel(feature, new ObservableCollection<GeometryCollectionMethod>()); // Then in the custom page set the view model on the GeometryCollectionControl control.GeometryCollectionViewModel = model; /// <summary> /// Whether the current geometry displayed on this page is valid. /// </summary> public Boolean IsGeometryValid { get { GeometryCollectionViewModel viewModel = _geometryCollectionControl.GeometryCollectionViewModel; GeometryCollectionMethod method = viewModel.GetCollectionMethodInProgress(); if (method != null && method.Geometry != null) { return method.Geometry.IsValid; } return false; } } /// <summary> /// The geometry that has been entered on this page. /// </summary> public Geometry Geometry { get { GeometryCollectionViewModel viewModel = _geometryCollectionControl.GeometryCollectionViewModel; GeometryCollectionMethod method = viewModel.GetCollectionMethodInProgress(); if (method != null) return method.Geometry; else return null; } } Hope this helps 🙂
... View more
10-28-2014
05:01 AM
|
0
|
4
|
575
|
POST
|
In case anyone was wondering I've discovered myself that synchronization of ArcSDE Enterprise Geodatabases only looks at edits on the adds and deletes tables. Any changes made direct to base tables will not be synchronized. As a result all edits should either be made: By an ArcGIS client (desktop, web based, mobile) Via a multi-versioned view
... View more
10-28-2014
04:19 AM
|
0
|
0
|
278
|
POST
|
GPS positions in ArcGIS Mobile 10.2 are markedly different from those in 10.0 on the same machine.They can be up to 200m out. They are far more accurate in 10.0. Anyone have any ideas why? I'm using exactly the same map documents for each version and they are all in British National Grid as that is what all my basemaps are in.
... View more
09-12-2014
03:47 AM
|
0
|
1
|
3380
|
POST
|
Hopefully an easy one - during synchronization bewteen two SDE databases (SQL Server) do edits to base tables get synchronized or is it just changes within the adds and deletes tables? The help states: "Data changes include inserts, updates, and deletes made in the replica version" but doesn't state how it determines these. And I'm asking because I want to add records to base tables in a child replica and then get them synchronised to the parent replica (or vice versa).
... View more
09-11-2014
06:50 AM
|
0
|
1
|
2446
|
POST
|
I have a custom solution that worked at ArcGIS Mobile 10.0 that I'm now porting to 10.2. It uses the SketchGeometryCollectionMethod. However I can't seem to get this working at 10.2 at all. The usual map window does not display to allow a geometry to be inputted. The following code used to display a map window with the current extent: Feature f = new Feature(m_mobileSettingsFeatureType, null); m_geometryCollection.StartGeometryCollection(f.Geometry); Also the GeometryCollectionPage property has been removed. Any ideas?
... View more
08-19-2014
03:51 AM
|
0
|
7
|
4041
|
POST
|
For anyone interested, I figured out a way to do it by making my application extension implement ICustomizationFilter. Here is the OnCustomizationEvent method I use: public Boolean OnCustomizationEvent(esriCustomizationEvent e, Object context)
{
if (e == esriCustomizationEvent.esriCEInvokeCommand && context is ICommandItem)
m_currentCommandId = ((ICommandItem)context).ID;
// Always return false - we don't want the UI locked.
// Just need to know the last command triggered
return false;
} Then in the OnSave method I can check to see if the m_currentCommandId UID is {119591DB-0255-11D2-8D20-080009EE4E51} and the sub-type is 3 which is the ID and sub-type for 'Save...'. The full list of UID values and sub-types can be found here.
... View more
08-27-2013
03:09 AM
|
0
|
0
|
210
|
POST
|
I need to differentiate between the 3 save commands in ArcMap using ArcObjects. I've created an application extension which overrides the OnSave(Stream stream) method but this is triggered when either: Save Save As... Save A Copy... is selected. Any idea how I work out which one was selected?
... View more
08-07-2013
07:16 AM
|
0
|
1
|
580
|
POST
|
Thanks for the reply Jake. I tried your suggestion but there is no 'Classify' renderer for mosaic datasets. So I'm back to using a raster catalog - anyone been able to iterate through the raster datasets in a raster catalog using Python?
... View more
09-03-2012
01:09 AM
|
0
|
0
|
344
|
POST
|
How do you get individual rasters from within a raster catalog in Python? I'm trying to: Get each raster in a raster catalog See if they are single band integer If they are then calculate the raster attribute table The raster catalog is stored in a SQL Server database and I need to automate building of raster attribute tables so that all users can then use the 'Classify' raster dataset renderer in ArcMap. They can't use this at the moment as they do not have 'CREATE TABLE' permissions in SQL Server and I really don't want to give them that permission. So far I have:
import arcpy
arcpy.env.workspace = r"Database Connections\\RASTER.sde"
arcpy.MakeRasterCatalogLayer_management("catalogName", "temp")
rows = arcpy.SearchCursor("temp")
for row in rows:
raster = arcpy.Raster(row.Raster) It bombs out at the 'arcpy.Raster' creation with 'TypeError: expected a raster or layer name' Thanks in advance for any help.
... View more
08-31-2012
01:33 AM
|
1
|
3
|
2948
|
POST
|
Just in case anyone finds this thread at a later date... The first example swingley gives does not work in Internet Explorer (7, 8 or 9) but the second one using 'dojox.gfx.fx' does. Both versions work in Firefox. I haven't tested in Chrome. Hope this helps someone as it has taken me quite a while to get it working in IE. Thank you very much swingley 🙂
... View more
08-14-2012
04:56 AM
|
0
|
0
|
525
|
POST
|
>but obviously this only works for 1 row. My stored procedure could potentially be creating 800+ rows Perhaps I've misunderstood your problem but I think this statement isn't correct. Each time you call the stored procedure to get the next OBJECTID for a feature class it updates the table storing the OBJECTIDs so that the next time you call it the OBJECTID will always be one higher. Modify your stored procedure to add (for SQL Server): DECLARE @Object_ID int DECLARE @Num_IDs int EXEC dbo.i51_get_ids 2, 1, @Object_ID OUTPUT, @Num_IDs OUTPUT where you'd replace the 'i51' with the correct value for your feature class from the SDE_table_registry, and then use the @Object_ID variable in your INSERT statement. Hope this helps.
... View more
11-21-2011
12:01 AM
|
1
|
1
|
1133
|
POST
|
Just to follow up on this in case anyone else is having problems... I contacted support here in the UK and the only Feature constructor we could get working between us was: new Feature(FeatureType, null) and then set all the attributes one by one from a FeatureDataReader for the existing feature, i.e. Feature f = new Feature(FeatureType, null); for (Int32 i = 0; i < featureReader.FieldCount; i++) { string columnName = featureReader.GetName(i); object o = featureReader[columnName]; f.FeatureDataRow[columnName] = o; } I wrongly assumed that this would create a new row in the dataset each time I just wanted to edit an existing feature. Pretty cumbersome and entirely un-documented (a bug report has been submitted against the documentation).
... View more
10-31-2011
07:30 AM
|
0
|
0
|
186
|
POST
|
Thanks for the reply. It's definitely not related to that issue though as my feature is a polygon displayed on the map. I think it may be related to using Guids as attribute values as I've tried my feature class minus all the attributes other than two Guid columns and I still get the same error.
... View more
10-12-2011
03:26 AM
|
0
|
0
|
186
|
POST
|
I'm having major problems creating new Feature instances using either of the following constructors: new Feature(FeatureLayerInfo, int) new Feature(FeatureDataRow) I want to create an instance from an existing data row so that I can pass it to an EditFeatureAttributesPage to re-edit the feature. This works when going through the normal workflow using the ArcGIS Mobile application but doesn't when I'm doing it programmatically. I've checked that all the attributes for the feature have a value but I still get either: "Object reference not set to an instance of an object." in the "SetProperties" method of Feature when usng the first constructor or "Value does not fall within the expected range." in the constructor of Feature when using the second constructor Anyone any ideas what I can do to work out what is going wrong?
... View more
10-12-2011
01:12 AM
|
0
|
3
|
440
|
Title | Kudos | Posted |
---|---|---|
1 | 11-21-2011 12:01 AM | |
1 | 08-31-2012 01:33 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|