POST
|
Let's say we create a point symbol using SymbolFactory.ConstructPointSymbol(color, 2.0, SimpleMarkerStyle.Point), with the size being 2.0: Is size similar to (graphic) point size, e.g. resolution / dpi dependent? Is there a way to get the symbol's extent (bounding box)? Can we convert this into screen coordinates using a formula or SDK function?
... View more
03-25-2020
11:46 PM
|
0
|
0
|
26
|
POST
|
We've developed an add-in and are looking at how to publish it on the ArcGIS Marketplace. The steps look straightforward until the "register an app" part (Register an app—ArcGIS Marketplace Help | ArcGIS); there's no clear set of instructions for add-ins afterwards. Any code or configuration changes we need to apply to the add-in? How does the OAuth 2.0 requirement apply to add-ins? Any help would be appreciated.
... View more
10-22-2018
03:30 AM
|
0
|
1
|
67
|
POST
|
I'm using the following code to open a connection to a feature server and adding a feature layer to the current map: var serviceUrl = @" http://url-of-feature-server/FeatureServer " ; var layerId = "0" ; var map = MapView . Active . Map ; using ( var geoDb = new Geodatabase ( new ServiceConnectionProperties ( new Uri ( serviceUrl ) ) ) { var defNames = geoDb . GetDefinitions < FeatureClassDefinition > ( ) . Select ( def = > def . GetName ( ) ) . ToArray ( ) ; var id = int . Parse ( layerId ) ; Debug . Assert ( defNames . Length > id ) ; if ( defNames . Length > id ) { using ( var featureClass = geoDb . OpenDataset < FeatureClass > ( defNames [ id ] ) ) { featureLayer = LayerFactory . Instance . CreateFeatureLayer ( featureClass , map ) ; featureLayer . SetDisplayCacheType ( DisplayCacheType . None ) ; featureLayer . SetDisplayCacheMaxAge ( TimeSpan . Zero ) ; } } } This works fine the 1st time this code gets executed. If the feature server has N feature layers then defNames gets N definitions. If the feature server gains a new layer, one would expect that the next time this code gets executed defNames would have N + 1 items. However it still returns N definitions. Using Fiddler, I can see that ArcGIS performs HTTP requests (to get feature definitions, metadata, etc.) the 1st time the Geodatabase object is created. Subsequent creations of new Geodatabase objects (using the same service URL) does not make any other HTTP requests, even when geoDb object was disposed via "using", as if it was being cached by ArcGIS. I would like to ensure that every time I create a new Geodatabase object that it has the most recent feature definitions and ArcGIS doesn't cache anything. How would one do that? Additionally, I've noticed that SetDisplayCacheType(DisplayCacheType.None) does not seem to apply or update the layer's properties (checking via Layer->Properties->Cache).
... View more
05-15-2018
09:43 AM
|
0
|
6
|
179
|
POST
|
Thanks for the response, Charles. Adding the feature server does create a group layer containing all the feature layers. A follow-up question: it is possible for the FeatureServer to get updated with a new layer. How would I add this new layer to the group, or somehow "refresh" the group layer for any new layers? I tried something like: // groupLayer = the existing group layer // "layer 5" is the newly available layer in the FeatureServer LayerFactory.Instance.CreateLayer(new Uri(" http:// ... url here.../FeatureServer/5"), groupLayer); But returns null as before.
... View more
05-08-2018
08:34 AM
|
0
|
0
|
16
|
POST
|
In my addin, I can successfully add a feature layer from a feature server to the current map using the LayerFactory, for example, adding layer 0: LayerFactory.Instance.CreateFeatureLayer(new Uri(" http://localhost:port/.../FeatureServer/0 "), map); If I try to add a different layer (from the same server), say layer 1, such as: LayerFactory.Instance.CreateFeatureLayer( new Uri(" http://localhost:port/.../FeatureServer/1 ") , map ); The function returns null. Using a tool like Fiddler shows that ArcGIS does not even attempt to contact the server given the URL. Is there a particular process one should follow when adding feature layers from the same feature server?
... View more
05-07-2018
07:08 AM
|
0
|
2
|
172
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|