POST
|
Having the same issue. Were you able to resolve this? I set the response header to enable Cors on the server and added esriConfig.defaults.io.corsEnabledServers to the code but no luck. Thanks
... View more
06-03-2015
08:33 AM
|
0
|
1
|
616
|
POST
|
Having the same issue. Were you able to resolve this? I set the response header to enable Cors on the server and added esriConfig.defaults.io.corsEnabledServers to the code but no luck. Thanks
... View more
06-03-2015
07:17 AM
|
0
|
0
|
665
|
POST
|
Trying to get a locator style programatically to use to standardize addresses but can seem to get ahold of one. Please help.
Dim locatorManager As ILocatorManager = New LocatorManagerClass
Dim workspaceFactory As IWorkspaceFactory = New FileGDBWorkspaceFactoryClass
Dim workspace As IWorkspace = workspaceFactory.OpenFromFile("C:\Locators\MyLocator.gdb", 0)
Dim locatorWorkspace As ILocatorWorkspace = locatorManager.GetLocatorWorkspace(workspace)
Dim _enum As IEnumLocator = locatorWorkspace.Locators(esriLocatorQuery.esriAllTypes, "")
I don't see any locator styles in the locator enumeration, only the locator. a file called LocatorStyle.xsd and a file called LocatorStyle.xslt both exist in the 'Locators' folder but the below code also does not work to retrieve the locator style.
Dim locatorManager As ILocatorManager = New LocatorManagerClass
Dim locatorWorkspace As ILocatorWorkspace = locatorManager.GetLocatorWorkspaceFromPath("C:\Locators")
Dim _enum As IEnumLocator = locatorWorkspace.Locators(esriLocatorQuery.esriAllTypes, "")
Dim locatorStyle1 As ILocatorStyle = locatorWorkspace.GetLocatorStyle("US Address - Dual Ranges")
the last line of code just returns an error saying "A locator with this name does not exist in workspace". The enum also shows 0 as the count of locatorStyles in that folder. Ideas???
... View more
07-24-2013
10:46 AM
|
0
|
0
|
484
|
POST
|
No one knows how to get a LocatorStyle programatically? .....wow I create a locator in a folder with a specific LocatorStyle, obviously, but when i look at the locator enumeration retrieved from the locator workspace only the locator is visible. Is there no way to get the locator style that was used to create the locator???
Dim locatorManager As ILocatorManager = New LocatorManagerClass
Dim workspaceFactory As IWorkspaceFactory = New FileGDBWorkspaceFactoryClass
Dim workspace As IWorkspace = workspaceFactory.OpenFromFile("C:\Locators\MyLocator.gdb", 0)
Dim locatorWorkspace As ILocatorWorkspace = locatorManager.GetLocatorWorkspace(workspace)
Dim _enum As IEnumLocator = locatorWorkspace.Locators(esriLocatorQuery.esriAllTypes, "")
Dim locatorStyle1 As ILocatorStyle = locatorWorkspace.GetLocatorStyle("US Address - Dual Ranges")
the last line of code just returns an error saying "A locator with this name does not exist in workspace"
... View more
07-24-2013
10:40 AM
|
0
|
0
|
193
|
POST
|
Jennifer, Based on something Brian said above. He changed his task to asynchronous so he could see results. I'm using synchronous and don't see results. I'd rather not switch to asynchronous if I can avoid it. Is there some reason the published model wouldn't return the results as a GPRecordSet? Is this something to do with how I defined the final output in the model? I have %scratchGDB%\Site_Results. Running the model on the server works fine but like I said, when I publish it and run from a client I don't get results. Im not that familiar with how to set up output for synchronous tasks. asynchronous is kind of obvious with the job folder specific to the task that has to be referenced by job id to retrieve status and results. Thanks, Gary
... View more
06-20-2013
01:37 PM
|
0
|
1
|
316
|
POST
|
I have some old code from 9.2 that tries to standardize an address stored in the database before trying to geocode that address. The capability to call StandardAddress on the GeocdeServer object is no longer available. I've tried numerous routes to standardize in 10.0 but everything leads to a dead end. Is there a simple way to standardize an address in 10.0? Ive tried the following - ArcObjects can't get locator style using GetLocatorWorkspaceFromPath("") and GetLocatorStyle(US Address - Dual Ranges"). Returns an error that a locator by that name does not exist. - Geoprocessing Tool requires the address to be stored in a table/featureclass. I just have a string. and don't want to go through everything involved in writing that value to a table and reading the new standardized address from a table. - Rest service no call to standardize address available Thanks, Gary
... View more
05-20-2013
10:05 AM
|
0
|
2
|
2446
|
POST
|
I'll give that a try. We put a ticket in with ESRI and one suggestion we got was to retrieve the feature class from the map server object instead of the using IFeatureWorkspace.OpenFeatureClass(). We were hoping to get around changing the code too much because its a migration from 9.1 and a relatively large complex process. thanks for the tip and i'll give an update as soon as I know either way. Gary
... View more
01-15-2013
11:54 AM
|
0
|
0
|
290
|
POST
|
I'm getting some errors trying to do a search on a feature class. The first search always works but the second search seems to fail 80% of the time and its typically a crash on line "pFC4 = streetSegFC2.Search(pSF4, True)". Im assuming it crashes instead of being caught because of an "out of memory" error. I'm realeasing the first cursor the best I can in every way i know how to but it seems to still be holding onto the cursor in memory. Originally I was using the same featureclass to search from but I decided to create a separate instance of the featureclass and that didn't help. I tried creating a completely separate workspace to create the second featureclass from which triggered a completely separate SDE stream/connection but it still fails. Any ideas on what to do if the cursors or memory aren't being fully released? The 2 searches below are virtually identical and hitting the same database featureclass. Thanks, Gary
pSF = New SpatialFilterClass()
pcomReleaser.ManageLifetime(pSF)
pSF.Geometry = pTopo.Buffer(bufTol)
pSF.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects
pSF.WhereClause = "FULLSTNAME='MAIN ST'"
Try
pFC = streetSegFC.Search(pSF, True)
pcomReleaser.ManageLifetime(pFC)
pF = pFC.NextFeature
If pF Is Nothing Then
Log.Log(LogLevel.DetailedInfo, "No streets found", _logFileName)
Return Nothing
End If
Catch ex As Exception
Log.Log(LogLevel.Exception, ex.Message & vbCrLf & ex.StackTrace, _logFileName)
Finally
pcomReleaser.dispose()
Common.Release(pFC)
pFC = Nothing
End Try
....
Some code
....
pSF4 = New SpatialFilterClass()
pcomReleaser.ManageLifetime(pSF4)
pSF4.Geometry = pTopo2.Buffer(bufTol)
pSF4.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects
pSF4.WhereClause = "FULLSTNAME='MAIN ST'"
Try
pFC4 = streetSegFC2.Search(pSF4, True)
pcomReleaser.ManageLifetime(pFC4)
pF4 = pFC4.NextFeature
If pF4 Is Nothing Then
Log.Log(LogLevel.DetailedInfo, "No streets found", _logFileName)
Return Nothing
End If
Catch ex As Exception
Log.Log(LogLevel.Exception, ex.Message & vbCrLf & ex.StackTrace, _logFileName)
Finally
pcomReleaser.dispose()
Common.Release(pFC4)
pFC4 = Nothing
End Try
... View more
01-09-2013
05:40 AM
|
0
|
3
|
631
|
POST
|
Yes, I tried changing the UseRecycling to false but that didn't help. I've also wondered if it was due to the fact that I'm calling this from a windows service on my local machine and i'm not sure if there are permission issues. Lastly, when connecting to the workspace i'm using the ArcServer product code to initialize. Not sure if thats right either.
Protected Sub connectToSDE_QRAEdit()
Log.Log("*********Connecting to QRA workspace**********", _logFileName)
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server)
Dim qraPropSet As New PropertySet()
Dim qraWorkspaceFactory As IWorkspaceFactory = New SdeWorkspaceFactory
Dim qraWS_Edit As IWorkspace
Try
Dim pAoInitialize As IAoInitialize
pAoInitialize = New AoInitialize
Dim licenseStatus As esriLicenseStatus
Dim productCode As esriLicenseProductCode
productCode = esriLicenseProductCode.esriLicenseProductCodeArcServer
licenseStatus = pAoInitialize.Initialize(productCode)
If (Not (licenseStatus = esriLicenseStatus.esriLicenseCheckedOut)) Then
Log.LogError("", New Exception("License Initialization Failed error = " & licenseStatus), _logFileName)
Throw New Exception("License Initialization Failed error = " & licenseStatus)
End If
qraPropSet.SetProperty("SERVER", Common.AppSettings("SERVER"))
qraPropSet.SetProperty("INSTANCE", Common.AppSettings("INSTANCE"))
qraPropSet.SetProperty("USER", Common.AppSettings("QRA_USER"))
qraPropSet.SetProperty("PASSWORD", Common.AppSettings("QRA_PASSWORD"))
qraPropSet.SetProperty("VERSION", Common.AppSettings("VERSION"))
qraPropSet.SetProperty("AUTHENTICATION_MODE", Common.AppSettings("AUTHENTICATION_MODE"))
qraWS_Edit = qraWorkspaceFactory.Open(qraPropSet, 0)
qraEditWorkspace = CType(qraWS_Edit, IFeatureWorkspace)
Catch ex As Exception
Log.Log(LogLevel.DetailedInfo, "Error trying to connect to SDE. [1]: " & ex.Message & vbCrLf & ex.StackTrace, _logFileName)
Log.LogError("Error trying to connect to SDE", ex, _logFileName)
Throw
Finally
End Try
End Sub
... View more
11-09-2012
05:37 AM
|
0
|
1
|
501
|
POST
|
I have some arcobjects code that runs fine when running it directly in visual studio. But it fails when I have it running as an SOE. It fails in a class where I have a call to search a feature class in 2 different locations based on different spatial filter logic. I've tried setting the map service to both pooled and not pooled but that probably has nothing to do with it as it had no effect. The error is: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at ESRI.ArcGIS.Geodatabase.IFeatureClass.Search(IQueryFilter filter, Boolean Recycling)" pFC = strSegFC.Search(pSF, True) Any ideas?
... View more
11-08-2012
06:28 AM
|
0
|
3
|
1295
|
POST
|
Try using the Initialized and InitializationFailed event for every layer you add to the map. Something like: layer.Initialized += LayerInitializedHandler; layer.InitializationFailed += LayerInitializationFailedHandler; map.Layers.Add(layer); That, as far as I can tell is part of the template code already. It seems like a service idol issue.
... View more
10-26-2012
06:15 AM
|
0
|
0
|
246
|
POST
|
What do you mean by 'MapLoadComplete' event?If you are talking about the Map.Progress event, this event may not be fired when the data (tiles and graphics) are already loaded locally. No, there is a MapLoadComplete event handler and dispatch function in the EventCenter class from the Silverlight templates. It seems when the services have been idol for a certain amount of time the MapLoadComplete event doesnt get fired. If I hit refresh on the browser it loads fine. This is very consistent when idol for a certain amount of time.
... View more
10-26-2012
06:12 AM
|
0
|
0
|
246
|
POST
|
Does anyone have any ideas why MapLoadComplete would not be triggered occasionally? Does it have to do with the services being idle too long? This only happens every 10 times or so and its hard to code a message that the layers didn't load when its basically asynchronous. Is there a known fix or work-around? thanks, gary
... View more
10-18-2012
11:44 AM
|
0
|
4
|
737
|
POST
|
has anyone figured out how to maintain attributes when projecting multiple graphics at once. Not sure I should trust the projected results are returned in the same order as the original list set as the userToken parameter. I'd love to call the projectAsync method for each graphic individually but I have a list of potentially hundreds of points.
... View more
09-25-2012
01:40 PM
|
0
|
0
|
303
|
POST
|
you had me excited for a minute. While this is an interesting blog I don't think it really addresses my issue. I've already serialized the geometries and stored them in the database via a web service. Now from the ArcObjects based application I can get the serialized graphic geometries from the DB but I just need an easy, elegant method of translating them to ArcObject geometries. I thought maybe that blog would suggest how because they mention using the geometries server side for custom processing but no translation method is discussed. Thanks, Gary
... View more
08-21-2012
07:04 AM
|
0
|
0
|
128
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|