Giter Site home page Giter Site logo

esri / arcobjects-sdk-community-samples Goto Github PK

View Code? Open in Web Editor NEW
123.0 33.0 194.0 21.54 MB

This repo contains the source code samples (.Net c#, .Net vb, and C++) that demonstrate the usage of the ArcObject SDK.

License: Apache License 2.0

C# 56.99% XSLT 0.54% C++ 3.21% C 0.26% Makefile 0.01% JavaScript 0.02% HTML 0.53% Visual Basic .NET 38.44%

arcobjects-sdk-community-samples's Issues

Find Near Features .NET SOE Github Sample (10.8.1) contains WSDL references to version 10.3.1

Issue: Error deserializing XML from .NET SOAP SOE (10.8.1) due to incorrect WSDL references in sample app

Description:

nearFeatsService.Url = "http://YourDomain.com:6080/arcgis/services/USA/MapServer/NetFindNearFeaturesSoapSOE";

  • Right-click the Web References (folder in Solution Explorer) > LocalHost, and choose "Update Web Reference", which downloads the WSDL web references file from the SOE into the SOAP Client app.
  • Run the app.
  • When the form opens, click the first button on the form, Get Layer Infos.
  • An exception is thrown on this line of code in Form1.cs:

CustomLayerInfo[] layerInfos = nearFeatsService.GetLayerInfos();

Exception Message:
There is an error in XML document (1,500).

Inner Exception:
"The specified type was not recognized: name = 'EnvelopeN', Namespace: 'http://esri.com/schemas/Arcgis/10.8';, at <Extent xmlns =">."

Cause of the Issue
The ESRI XML Schema version in the Github SOE SOAP sample (Find Near Features) is incorrectly set to 10.3.

Solution to the issue.

  • Changing the value from 10.3 to 10.8 resolves the exception.
  • This change should be made in four places within the XML code in the WSDL file (in the "Find Near Features" SOAP SOE project), as shown below:
    NetFindNearFeaturesSoapSOE.wsdl

<xs:schema targetNamespace="http://www.esri.com/schemas/ArcGIS/10.8""
xmlns="http://www.esri.com/schemas/ArcGIS/10.8">;
....
....

<xs:schema xmlns="http://www.esri.com/schemas/ArcGIS/10.8""
targetNamespace="http://examples.esri.com/schemas/NetFindNearFeaturesSoapSOE/1.0""
xmlns:tns="http://examples.esri.com/schemas/NetFindNearFeaturesSoapSOE/1.0">;
<xs:import namespace="http://www.esri.com/schemas/ArcGIS/10.8"" />
....
....

  • Issue was reported by a customer to ESRI Support.

ApplicativeAlgorithmsPage does not work in Designer

After getting PropertyPages DLL reference from an older sample (10.2.1) and compiling, the algorithm and its page are displayed correctly in ArcMap and working as expected.

But when going into Designer to configure whether the algorithm is Visible/Editable the editable checkbox does not check (always unchecked) and the property page button is always disabled.

I tried to make multiple changes but to no avail. None worked. Is there a way to fix this? (I am on 10.6.1)

How to zoom to raster resolution?

I use this code,but it's not perfect solution

            pActiveView.Extent = (pRasterLayer as IGeoDataset).Extent;
            IntPtr pHandle = new IntPtr(pActiveView.ScreenDisplay.hWnd);
            AxMapControl axMapControl1 = Form.FromHandle(pHandle) as AxMapControl;
            int controlWidth = axMapControl1.Width;
            double controlW = Convert.ToDouble(controlWidth);
            IMap pMap = pActiveView.FocusMap;
            pMap.MapScale = (controlW / pRasterLayer.ColumnCount * pMap.MapScale);
            MessageBox.Show(pMap.MapScale.ToString());
            pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);

ArcGIS 10.6.1+C#

ReductionLinkRule adds links back that have already been hidden

The Reduction Link Rule is a great sample that I've used to remove loops (two parallel lines with the same start and end nodes). It worked perfectly except that when I ran it late in my stack of rules added many lines back into the diagram that had been hidden by previous rules. By removing the line:
"schemElement.Displayed = true;"
at approximately line 225 the rule behaved as I would have expected and honored any previously removed lines. The features should only be hidden by the rule, not added back into the diagram. It is just a sample, but that change makes it more useful for me.

workspace or data source is read only

Hi,i hava a problem about this project “arcobjects-sdk-community-samples/Net/Server/ServerEditFeaturesRESTSOE/”.

// store feature in feature class
feature.Store();

This codes prompts "workspace or data source is read only".
My ArcGIS Server Version is 10.3.
Can you give me a favor?
Tks.

how to use IScreenDisplay in Task

I want to use multi threads(like Task) to improve display performance,but when i use task,the tile doesn't display in map ,In task ,I use IDisplay para,so I doubt whether the IDisplay para is the problem which causes the data don't display.

List<Task>taskList=new List<Task>();
for(var tile in tiles)
{
    taskList.Add(Task.Run(() =>displaying my tiles code));
}
Task.WhenAll(taskList.ToArray());

Forgive my poor English,Any help will appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.