POST
|
Hi, Thanks for the answer and sorry for the delay. I suspected that might be the case. The issue was found by our test team as they were testing the search based on the properties of a number of sample features and Shape was one of those properties. Therefore, in the real world scenario, there may well not actually be a use case for needing to search on the Geometry attribute so we are just going to park it as a known issue. Again, thanks.
... View more
03-03-2015
02:09 AM
|
0
|
0
|
509
|
POST
|
Hi, I came up with a work around. First I considered a geoprocessing task and wrote some python that produced a list of attachment names to be returned but this had some downsides. One being that it required knowing about the location and structure of the geodatabase, which is organised differently from the published service, so you can work out the layer ids the attachments related to. It was also susceptible to changes made by the GIS team as would need to be manually changed if they moved things around. Finally, of course, it would only work for map services on our own GIS servers where we can actually write our own geoprocessing tasks. So, instead I wrote an indexer service. It's just a C# console application that runs as a Windows service. It requests the MapServer json for a service to get the list of layers, then for each layer gets the list of object ids then for each object id, gets the attachmentinfo. If there are attachments, it puts the details in the database. I then just wrote a WebAPI webservice that queries against this index, rather than directly against the ArcGIS server. It works really well: the query is very fast and it can index any map service, not just our own. Of course, the caveat is it's only as up to date as the last time it indexed the service, but that can be done as often as you need.
... View more
03-03-2015
02:05 AM
|
0
|
0
|
684
|
POST
|
Hi, I'm trying to query a REST map serviced using the Shape attribute and it doesn't return any results. I'm doing this from the JavaScript API using the FindTask with search field set to Shape and the search text set to a shape type e.g. Point, Polyline or Polygon. None are returned. However, when you examine the result of a search for something else, it does contain a Shape attribute with one of the given values. I've also confirmed it's not working using the REST endpoints 'query' page. My guess is this is a limitation of the REST service, probably something to do with the shape field being of type esriFieldTypeGeometry rather than a plain string type. Can anyone confirm that it is a limitation, or whether it should in fact work but that I'm therefore doing something wrong? Thanks
... View more
02-18-2015
12:33 PM
|
0
|
2
|
4224
|
POST
|
Thanks for your help - I've got it working. To correct something I said earlier, the bottom most layer is 0, not the top most. This makes the maths easier as you pointed out: the graphics and feature layers are always on top so don't skew the ids at all. It's simply a matter of getting the index in the array of the layer you want to move and adding / subtracting. It's therefore really easy to create up / down buttons that adjust the position of the selected layer. Thanks for your help!
... View more
12-15-2014
04:36 AM
|
0
|
0
|
1562
|
POST
|
Ah, I wondered if that might be the case. I'll experiment with this further next week but I think that hopefully answers it - I'll let you know! Thanks for your help.
... View more
12-12-2014
08:54 AM
|
0
|
1
|
1562
|
POST
|
Hi Ken, Thanks for that - I had just come to a similar conclusion: that the layerIds are (I think) returned in their index order (or rather reverse order). i.e. it will be the order the layers were added to the map by default, but the top most layer for repositioning is 0. If a layer has been re-ordered then it will appear in a different index in the layerIds array. However, there is still something I'm not certain of. There is also a graphicslayerIds property which returns the ids of all the graphics layers and feature layers: these layers aren't included in the layerIds array. So say you had 5 dynamic map services and 5 feature layers on a map: layerIds returns [dynamicA, dynamicB, dynamicC, dynamicD, dynamicE] graphicsLayerIds returns [featureA, featureB, featureC, featureD, featureE] How would you know what index to set dynamicC to to move it above dynamic?
... View more
12-12-2014
08:46 AM
|
0
|
3
|
1562
|
POST
|
Hi, Does anyone know if there is a way of getting a layers current index / order in the map? The map has a reorder function where you can pass a layer and an index, but in order to know where I want to place the layer, I need to know the index of the layer I'm moving it above or below. It occurred to me it might be possible to keep track of the order all layers are added to the map, for example by listing for layer-add type events. I'm not sure how reliable that would be though and hoped there was a built in mechanism. Note: I'm not wanting to re-order sub layers within a map service, as per the reorder example here: Reorder layers in map service | ArcGIS API for JavaScript I want to actually re-order the map service layer itself, relative to other map service layers loaded in the map. Thanks
... View more
12-12-2014
08:20 AM
|
0
|
5
|
3638
|
POST
|
The FindResult object, returned from a FindTask, includes a displayFieldName property which as the API describes, is the name of the layer's primary field. The FindResult also includes the feature with it's attribute object. However, the attribute object uses alias names not field names. This means you can't use the displayFieldName property to get the value of the corresponding attribute if your features primary field is using an alias. Could this be a bug or an oversight, or have I just missed some trick that would solve the issue? If not, it seems it would make sense to return the displayFieldAlias instead, which would be the displayFieldName if the attribute didn't have an alias.. Does anyone know how to report bugs to ESRI? Thanks!
... View more
12-11-2014
03:15 PM
|
0
|
1
|
1425
|
POST
|
Hi, Does anyone know if it's possible to search for attachments using a task, or if not, any viable work around? My requirement is that I want to be able to take a text value from the user and then return any attachments with a filename matching the input (or partially containing the input). A find task allows you to perform the text search on attributes, but attachments don't seem to be an attribute in this way. The only workaround I can come up with is to return each feature and then make a request to the features endpoint with /attachments?f=json appended and see if a valid attachmentinfo comes back. This works fine when identifying a small number of features, e.g. where the user has clicked, but isn't viable as a way of searching as it could have to make hundreds or thousands of individual requests. Thanks
... View more
12-11-2014
02:53 AM
|
0
|
3
|
4866
|
POST
|
Yeah, I came across that too after I'd asked the question, but thought I'd leave my question up in case things have changed since then. It doesn't look like they have and so I think it's just a case that the notes in the API are just a bit ambiguous.
... View more
11-06-2014
10:07 AM
|
0
|
1
|
1220
|
POST
|
Hi Jake, Thanks for a quick answer. However, I don't see how that differs to the layer-add event - it looks like it will be fired every time a layer is added but the API says it is fired when a specified layer is added. Simon
... View more
11-06-2014
09:50 AM
|
0
|
0
|
1220
|
POST
|
The ArcGIS JavaScript API Map object has the following two events (text taken from the API): layer-add Fires any time a layer is added to the map. Should be used in favor of onLayerAdd. (Added at v3.5) layer-add-result Fires after specified layer has been added to the map. Should be used in favor of onLayerAddResult. (Added at v3.5) layer-add does exactly what it says: fires every time a layer is added. However, layer-add-result says it will fire after specified layer has been added. How do you specify the layer to trigger this event to fire?
... View more
11-06-2014
09:33 AM
|
0
|
5
|
7474
|
POST
|
Solved! I noticed that the sample code I'd copied was using API version 3.10. I was still using 3.9. I changed my application to use 3.9 and voila, problem solved. So, looks like it was a bug in the Measurement dijit in v3.9.
... View more
08-27-2014
06:58 AM
|
0
|
0
|
453
|
POST
|
I created a simplified page to show the problem - I basically just took the measurement sample code and changed it to load one of our own map services in SRef 23031. However, the area measure worked properly! On the full application where the problem is occurring, I have determined that the measure-end event simply isn't raised when using the area measure tool. It is raised when using the line and location tools. I'll keep digging. Any tips or advice to help diagnose the issue? Thanks!
... View more
08-27-2014
06:09 AM
|
0
|
1
|
453
|
POST
|
Hi Jonathan, The geometry service is running on an ArcGIS Server Enterprise Standard install, version 10.21. The web application isn't yet finished so hasn't been uploaded to an external site. However, I could put a quick example page together and just copy in the measurement related code. I'll get this done ASAP next week and post the URL. Thanks for your quick reply. Simon
... View more
08-22-2014
09:50 AM
|
0
|
2
|
453
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|