|
POST
|
We have a project for a customer using ArcGIS Mobile 9.3.1 running on a windows desktop toughbook. For better knowing and controlling which version of ArcGIS Mobile is used for the project we do not install the arcgis mobile runtime but delivering following files with our software: ESRI.ArcGIS.Mobile.dll (9.3.1.3000, 484kb) -> included as .net library in our project ESRIMobileCore.dll (9.3.1.3000, 296kb) -> just copied to same directory like ESRI.ArcGIS.Mobile.dll ESRIMobileGPS.dll (9.3.1.3000, 241kb) -> just copied to same directory like ESRI.ArcGIS.Mobile.dll ESRIMobilePE.dll (9.3.0.1738, 552kb) -> just copied to same directory like ESRI.ArcGIS.Mobile.dll ESRIMobileSdc.dll (9.3.0.1339, 1400kb) -> just copied to same directory like ESRI.ArcGIS.Mobile.dll So, for long time it was no problem to start our program like that. But sometimes we get an TypeInitializationException after compiling new and running program. The error appears in the MainForm Designer File on initialising the form:
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
ESRI.ArcGIS.Mobile.MetricUnitLabels metricUnitLabels1 = new ESRI.ArcGIS.Mobile.MetricUnitLabels();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMap));
this.p_Map = new ESRI.ArcGIS.Mobile.Map();
this.sketchGraphicLayer = new ESRI.ArcGIS.Mobile.Sketch.SketchGraphicLayer();
this.p_ScaleBar = new ESRI.ArcGIS.Mobile.ScaleBar(this.components); //<--- Error
this.p_ToolStrip = new System.Windows.Forms.ToolStrip();
...
}
This is part of designer, we did not change anything. The full exception message is: System.TypeInitializationException: Der Typeninitialisierer für "ESRI.ArcGIS.Mobile.SpatialReferences.ProjectionCoreApi" hat eine Aussnahme verursacht. ---> System.InvalidOperationException: Missing ArcGIS registry key. bei ESRI.ArcGIS.Mobile.Native.WindowsApi.LoadCore(String dllName) --- Ende der internen Ausnahmestapelüberwachung --- ESRI.ArcGIS.Mobile.SpatialReferences.ProjectionCoreApi.CreatUnit(String unitName, Double factor) bei ESRI.ArcGIS.Mobile.SpatialReferences.Unit..ctor(UnitTypes type) bei ESRI.ArcGIS.Mobile.SpatialReferences.Unit.UnitCollection..ctor() bei ESRI.ArcGIS.Mobile.SpatialReferences.Unit.get_Units() bei ESRI.ArcGIS.Mobile.ScaleBar..ctor() bei ESRI.ArcGIS.Mobile.ScaleBar..ctor(IContainer container) bei MyProject.InitializeComponent()
... View more
10-21-2010
04:46 AM
|
0
|
4
|
1154
|
|
POST
|
I have no example iheriting from ZoomInMapAction, but I can give you an short example from another one. using System;
using System.Windows.Forms;
using ESRI.ArcGIS.Mobile;
using ESRI.ArcGIS.Mobile.Geometries;
using ESRI.ArcGIS.Mobile.MapActions;
using ESRI.ArcGIS.Mobile.MobileServices;
namespace xyz
{
/// <summary>
/// Move a feature by mouse drag
/// </summary>
internal class MovePointMapAction : MapAction
{
private ToolStripButton _controlButton;
public MovePointMapAction()
{
StatusChanged +=
delegate(object o, MapActionStatusChangedEventArgs e)
{
if (e.StatusId == Activated)
{
if (Map != null)
{
Map.Focus();
Map.Cursor = Cursors.Cross;
if (_controlButton != null)
{
_controlButton.Checked = true;
}
}
}
if (e.StatusId == Deactivated)
{
ActionInProgress = false;
if (Map != null)
{
if (_controlButton != null)
{
_controlButton.Checked = false;
}
Map.Cursor = Cursors.Default;
}
}
};
}
public ToolStripButton ControlButton
{
set { _controlButton = value; }
}
protected override void OnMapMouseDown(MapMouseEventArgs e)
{
ActionInProgress = true;
Map.SuspendDrawing = true;
}
protected override void OnMapMouseUp(MapMouseEventArgs e)
{
if (ActionInProgress == false && Map.IsValid == false) return;
Point lPoint = new Point(e.MapCoordinate);
if (Map.GetFullExtent().Contains(lPoint.Coordinate))
{
try
{
FormIdentifyNavi lIdentifyForm = ((FormMap) Map.Parent).FormIdentify;
FeatureDataRow lDataRow = lIdentifyForm.CurrentRow;
Point lOldPoint = lDataRow[lDataRow.FeatureLayer.GeometryColumnIndex] as Point;
if (lOldPoint != null)
lOldPoint.Coordinate = lPoint.Coordinate;
}
catch (Exception ee)
{
MessageBox.Show(ee.Message, Messages.Error);
}
}
Map.SuspendDrawing = false;
ActionInProgress = false;
Map.Invalidate();
}
// Properties
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
ActionInProgress = false;
}
public override string ToString()
{
return "MovePointAction";
}
}
}
... View more
10-05-2010
11:27 PM
|
0
|
0
|
483
|
|
POST
|
Not yet. There will be a language pack for 5 most used languages soon. Don't remember the 5 languages, I know it was german. But I think it was also french and spanish.
... View more
09-16-2010
01:03 AM
|
0
|
0
|
276
|
|
POST
|
I had the same issue. When I sent in a blank new queryfilter it worked. Try: DataTable table = layer.GetDataTable(new QueryFilter); Or you use a null parameter to get all data: FeatureDataTable table = layer.GetDataTable(null); For not selecting all data it is good to use the QueryFilter
QueryFilter queryFilter1 = new QueryFilter(string.Format("ID = {0} AND JAHR = {1}", id, jahr), true);
FeatureDataTable table = layer.GetDataTable(queryFilter1);
For selecting data by geometry:
QueryFilter queryFilter2 = new QueryFilter();
queryFilter2.Geometry = _aktGeom.GetExtent();
queryFilter2.GeometricRelationship = GeometricRelationshipType.Intersect;
FeatureDataTable table = layer.GetDataTable(queryFilter2);
... View more
09-16-2010
12:55 AM
|
0
|
0
|
725
|
|
POST
|
Here you find a video showing the procedure: http://resources.arcgis.com/gallery/video/arcgis-mobile/details?entryID=85FA839A-1422-2418-882A-E1148D3DE858
... View more
09-02-2010
11:23 PM
|
0
|
0
|
1183
|
|
POST
|
You want to be pretty sure, that the port is open? 🙂
if (!_serialPortGpsConnection.IsOpen)
{
System.Windows.MessageBox.Show("GPS Device could not be detected");
return;
}
Boolean port = _serialPortGpsConnection.IsOpen;
if (!port) System.Windows.MessageBox.Show("The serial port could not be detected");
GpsConn = _serialPortGpsConnection;
if (!GpsConn.IsOpen) System.Windows.MessageBox.Show("The GPS Connection could not be established"); 3 times the same, but on a different way.:D
... View more
09-02-2010
11:14 PM
|
0
|
0
|
1372
|
|
POST
|
Would be also interesting for me. Had have a look for it but can't find any information about how doint it.
... View more
09-02-2010
11:05 PM
|
0
|
0
|
1539
|
|
POST
|
I think you can not use them. In Mobile SDK you are limited with your symbols, you even can not use all standard symbols you know from ArcMap. IElement is not Part of Mobile SKD, because there are no interfaces.
... View more
08-25-2010
10:44 PM
|
0
|
0
|
338
|
|
POST
|
Out of the box you can only load feature classes - or lets say: tables with geometry. Two possibilities: Either you build your own mechanism for downloading tables without geometry (there is existing something for free, but it is hard to find and much harder to understand) or you add a geometry for this tables, even if it is a dummy geometry.
... View more
08-24-2010
10:31 PM
|
0
|
0
|
255
|
|
POST
|
To check if it is possible to edit data you can use
if (featureLayer.AllowNew || featureLayer.AllowModify)
{
}
The only condition for editing data is an existing GLOBAL_ID field in the feature class. You can add it in ArcCatalog.
... View more
08-19-2010
03:10 AM
|
0
|
0
|
576
|
|
POST
|
I don't know 10 yet, but with 9.3 the InitialExtent and the FullExtent (or like it named here: Extent) depends on the settings of the map document. It is fixed in the document and normally will not change. What you are looking for is an individual extent. You have to create an envelope (which contains your area) and to give this as parameter instead of the InitialExtent. Storing should be no problem, thats the point of mobile map caches. The only thing is to NOT delete the map cache when no update is running.
... View more
08-01-2010
11:06 PM
|
0
|
0
|
335
|
|
POST
|
Did you create a GLOBAL_ID field on the FeatureLayer to be edited? That is essential for editing.
... View more
08-01-2010
10:58 PM
|
0
|
0
|
255
|
|
POST
|
With a code snippet and the error message it would be much easier to help you ...
... View more
08-01-2010
10:56 PM
|
0
|
0
|
256
|
|
POST
|
That would not be possible. Nearly everything has been changed for Mobile. For Mobile 10 you now get a very good standard client by using the mobile project center. it is a wpf client you can modify with own tasks and extensions. Problem is, you cannot change main app. If you want to do this, you have to create an own apllication basing on the mobile ADF like before in 9.3.
... View more
07-28-2010
11:02 PM
|
0
|
0
|
434
|
|
POST
|
Hi, here is a site containing some examples: http://resources.esri.com/help/9.3/arcgismobile/adf/security_in_mobilesdk.htm Greetings, Max
... View more
07-26-2010
12:13 AM
|
0
|
0
|
434
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-11-2025 04:40 AM | |
| 2 | 09-20-2019 03:24 AM | |
| 2 | 09-26-2019 04:37 AM | |
| 3 | 01-25-2022 08:44 AM | |
| 1 | 06-22-2021 12:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-28-2025
05:33 AM
|