POST
|
Hi, I have an SOE deployed and can call it fine using a browser using the following: https://server/arcgis/rest/services/Testing/TestLayer/MapServer/exts/FeatureCountSOE/findNearbyFeatures?layerId=0&location=%7B%22x%22%3A0%2C%22y%22%3A0%2C%22spatialReference%22%3A%7B%22wkid%22%3A3857%7D%7D&distance=10000&f=json That works fine and sends a json response with the feature count. What I need is to replicate the call above but using the JS API, I have tried a few things but none seem to pass append the REST endpoint with the required parameters (layerId, location and distance), here's what I tried var queryTask = new QueryTask({ url: "https://server/arcgis/rest/services/Testing/TestLayer/MapServer/exts/FeatureCountSOE/findNearbyFeatures", layerId: 0, distance: 10000, location: "{'x':0,'y':0,'spatialReference':{'wkid':3857}}", f: "json" }); var query = new Query(); query.outFields = ["*"]; queryTask.execute(query).then(function(results){ alert(results); }); Am I way off the mark? Feels like it 😕 Thanks for your help!
... View more
07-09-2020
09:39 AM
|
0
|
1
|
511
|
POST
|
Using the arcobjects SDK (10.7.1) I am simply trying to count the number of features returned by a feature service query, here is some sample code: IMapServer3 ms = (IMapServer3) this.mapServerDataAccess; ... // query for relevant features using spatial filter QueryResult queryResult = (QueryResult) ms.queryData(mapName, getTableDescription(mapServerInfo, layerId), spatialFilter, qResultOptions); RecordSet rs = (RecordSet) queryResult.getObject(); I can count the number of features returned by getting a cursor and iterating through the cursor items incrementing a counter along the way but this is extremely slow and when working with layers with 2+ million points this is not feasable. Is there a way of getting the count of the number of features in the returned RecordSet? I couldn't see anything obvious. Appreciate your help.
... View more
04-07-2020
02:21 AM
|
0
|
2
|
357
|
POST
|
Scenario: For my prototype I have published a service with one layer. The layer has 3 polygons with an entitlement attribute. Only one polygons entitlement is set to true. I need to write an SOE (in Java) to draw the polygons return an image, the polygon with the attribute set to true needs to be drawn differently, maybe a thicker line or an additional inner border or something along those lines. Unfortunately I don't have the luxury of drawing the polygons client side due to the shear volume of features. I've worked through the bundled SDK samples but can't find anything appropriate. So my questions are: Can an SOE return an image? Ive been experimenting with the REST request appending &format=image but I just cant get my SOE to return a png Is it possible to style particular features differently based on an attribute? If so, how would I update the legend to include the different styled feature Thank you
... View more
01-30-2019
01:58 AM
|
0
|
1
|
465
|
POST
|
Hello! I have a layer with 3 million points, of the 3 million there are roughly 70,000 distinct coordinates (but each of the 3 million points also have coordinates). I only need to display the 70,000 unique points but I need to be able to query the 3,000,000 records (using JS API), a simplistic view of the data below: ID SITE LAT LONG PRODUCT 1 1 1.1 1.1 Product 1 2 1 1.1 1.1 Product 2 3 1 1.1 1.1 Product 3 4 2 2.2 2.2 Product 1 5 2 2.2 2.2 Product 6 6 2 2.2 2.2 Product 9 7 3 3.3 3.3 Product 4 8 3 3.3 3.3 Product 6 9 4 4.4 4.4 Product 1 0 4 4.4 4.4 Product 2 ... 3000000 ..... If I publish this layer then all 3 million points are plotted which is not great for performance. For plotting terms I only need to plot the distinct points BUT for querying terms I need to query the entire 3 million rows (using a QueryTask). I think the solution may be to create a parent child relationship but Im struggling to see how I can filter on PRODUCT in the child table and then de-reference back to the parent record. Thanks for your help! Chris.
... View more
01-15-2019
04:34 AM
|
0
|
0
|
303
|
POST
|
Hello, I'm struggling a little here. I'm trying obtain the list of features from mixed feature layers and display all the results in a ESRI popup widget (with carosel) similar to how this map identify works: Edit fiddle - JSFiddle The example above is using an early version of the JS API so trying to figure out the new API equivalent is proving a bit tricky. Any ideas? Thank you very much.
... View more
08-14-2017
06:09 AM
|
0
|
2
|
660
|
POST
|
This is the correct answer for 3.x, I can only mark one as correct and that was the answer below as I'm working with JS API 4,3 I would mark them both correct if it was possible. Thanks for your help!
... View more
03-27-2017
06:18 AM
|
0
|
1
|
874
|
POST
|
Thanks for your response, sorry, I forgot to mention I'm using API 4.3 and from what I can see your solution is for API 3.x. I will look for an API 4.3 equivalent, thanks again.
... View more
03-27-2017
04:27 AM
|
0
|
1
|
874
|
POST
|
I was after a little help on something I've been stuck on and was wondering if someone could give me a little guidance? Basically, I want to be able to run a specific JS function after the user clicks on a result from the search widget list of results, the use case would be: a user clicks in the search widget and enters some text, the suggested results popup up below the widget and as soon as a user clicks on a result this calls a function that I have written (hopefully with an id that relates back to the clicked search result). Thanks, Chris.
... View more
03-27-2017
12:57 AM
|
0
|
5
|
1875
|
POST
|
This has baffled me for hours, I've tried nearly every combination of request parameters without success. I have a points shapefile published in arcgis and can download the feature GML via WFS for the entire layer using the following request (sorry the server is not available on the internet): http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&typeName=iwiswells Which returns XML for each feature member in the layer like so: <wfs:FeatureCollection xsi:schemaLocation="http://server/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer http://server/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?request=DescribeFeatureType%26version=1.1.0%26typename=iwiswells http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <gml:boundedBy> <gml:Envelope srsName="urn:ogc:def:crs:EPSG:6.9:4326"> <gml:lowerCorner>28.522 -10.5</gml:lowerCorner> <gml:upperCorner>80.469 65.01144</gml:upperCorner> </gml:Envelope> </gml:boundedBy> <gml:featureMember> <DMS_DMS_WELLS:iwiswells> <DMS_DMS_WELLS:FID>0</DMS_DMS_WELLS:FID> <DMS_DMS_WELLS:Shape> <gml:Point> <gml:pos>64.994 7.5312</gml:pos> </gml:Point> </DMS_DMS_WELLS:Shape> <DMS_DMS_WELLS:gid>1</DMS_DMS_WELLS:gid> <DMS_DMS_WELLS:sitelocid>101</DMS_DMS_WELLS:sitelocid> <DMS_DMS_WELLS:site_ref>101/1</DMS_DMS_WELLS:site_ref> <DMS_DMS_WELLS:latitude>24.9943</DMS_DMS_WELLS:latitude> <DMS_DMS_WELLS:longitude>47.5002</DMS_DMS_WELLS:longitude> </DMS_DMS_WELLS:iwiswells> </gml:featureMember> <gml:featureMember> ... </gml:featureMember> </wfs:FeatureCollection> And this results in on feature member begin returned. What I'm looking for is an arcgis WFS equivalent! I have read all the documentation, all the specs but my request either result in the entire feature list being returned or an error message, here's a few requests I have tried: http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&featureid=10 http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&typeName=iwiswells&CQL_FILTER=FID='10' I've even tried using a filter on a different attribute without success: http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&typeName=iwiswells&filter=<Filter><PropertyIsEqualTo><PropertyName>site_ref</PropertyName><Literal>10</Literal></PropertyIsEqualTo></Filter> Thanks for your help!
... View more
09-04-2014
08:28 AM
|
0
|
0
|
2853
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|