POST
|
Can anybody tell me what the best practice would be for consuming a Feature Service in Geoportal. If I add the Map Server version of a service, everything runs great. But when I swap it out for the Feature Service, the draw time tanks. The service is a line feature with about 100,000 features. I set the draw scale to be very low but it still doesn't help. Some details: It is a line feature class in a geodatabase. It is served by arcserver. I then load the rest endpoint into Geoportal. I then consume it with collector. Another note...the performance on the mobile device (in collector) is much better that the web version (portal) Thanks for any advice.
... View more
05-03-2017
02:03 PM
|
0
|
0
|
446
|
POST
|
I have made a featureLayer from a featureCollection like in the following example: require([
"esri/layers/FeatureLayer", ...
], function(FeatureLayer, ... ) {
var layerDefinition = {
"geometryType": "esriGeometryPolygon",
"fields": [{
"name": "BUFF_DIST",
"type": "esriFieldTypeInteger",
"alias": "Buffer Distance"
}]
}
var featureCollection = {
layerDefinition: layerDefinition,
featureSet: null
};
var featureLayer = new FeatureLayer(featureCollection, {
showLabels: true
});
...
}); I have added it to the map, so I know it works. However, when I try to create a featureTable from the new featureLayer...no dice. I have created a featureTable from a featureLayer that uses a rest endpoint with no problems. I'm just wondering if there is something i'm missing with the feature collection. Any advice is much appreciated. Thanks
... View more
04-20-2017
02:19 PM
|
0
|
0
|
615
|
POST
|
Thanks Robert...FeatureCollection worked perfectly!
... View more
04-20-2017
08:28 AM
|
0
|
0
|
1310
|
POST
|
I am trying to convert a graphics array to a FeatureLayer, exactly like the following ESRI API example: ArcGIS API for JavaScript Sandbox I'm having to convert this example back to 3.2 because I need to add a feature table which is not yet available in 4.3. Can anybody tell me how to do this with the 3.2 library instead of the 4.3? More specifically, I need to know how to get the same results on the 'new Point' function found on line 293. In 4.3, the array that is created has a lot more attributes that the same array created in 3.2. From what I can tell, this is what is keeping me from creating the new FeatureLayer in 3.2. Thank you.
... View more
04-19-2017
01:24 PM
|
0
|
3
|
4107
|
POST
|
Dan, You were right, re-projecting the coordinates and doing the calculations on planar values worked. The math above is right, I just cant use lat/longs. Thanks again!
... View more
04-11-2016
02:14 PM
|
0
|
0
|
763
|
POST
|
Very new to coding...I am trying to set a variable to the contents of an external ".json" file. It contains an array. I can't figure out how to reference the file correctly in html/javascript and set the variable simply to the array. Thanks for any advise.
... View more
04-11-2016
02:10 PM
|
0
|
2
|
2971
|
POST
|
Thanks Dan, I only have access to what is available through the Javascript API. I think that the code is drawing the points along the ellipse correctly, but, tying the math in with the projection/scaling issue is what I'm having trouble with. Josh
... View more
04-11-2016
06:55 AM
|
0
|
0
|
763
|
POST
|
I am trying to get points to plot along an ellipse around a point. I can get the ellipse to draw but the scale is off (very large). The scale is closer when i divide my variable by "200000". I believe it has something to do with using lat long (Degrees) instead of x y (Feet). Can anybody check my code/math to see where I'm going wrong? Any advise is appreciated. ____________________ function drawPt (lat, lon, size, color, drawBorder){ var markerSymbol = new SimpleMarkerSymbol({ "color": color, "size": size, "type": "esriSMS", "style": "esriSMSCircle", "outline": { "color": [255, 255, 255], "width": 1, "type": "esriSLS", "style": "esriSLSSolid" }}); if (!drawBorder) markerSymbol = new SimpleMarkerSymbol({ "color": color, "size": size, "type": "esriSMS", "style": "esriSMSCircle"}); var point = new Point({ "x": lon, "y": lat, "spatialReference": {"wkid": 4326 }}), markerSymbol = markerSymbol; var pointGraphic = new Graphic(point, markerSymbol); graphicsLayer.add(pointGraphic);} function toRadians(degrees){ return degrees * (Math.PI / 180);} function drawEl(lat, lon, major, minor, angle) { var h = lon; // x coord of ellipse centre (in degrees) var k = lat; // y coord of ellipse centre (in degrees) //The scale is close when i divide these variables by 200000...(= minor/200000)(= major/200000) var a = minor; //originally in meters var b = major; //originally in meters var ang = (0-(toRadians(angle))); // rotation, counter-clockwise, from north (I added "0-" to get the additive inverse because 'angle' is a bearing that runs clockwise.) var points = []; for (var i = 0; i < 360; i++) // one point per degree, change if you wish { var t = toRadians(i); // ellipse math var x = a * (Math.cos(t)); // ellipse math var y = b * (Math.sin(t)); // ellipse math var rot_x = h + (x*Math.cos(ang)) - (y * Math.sin(ang)); // rotate/transpose ellipse var rot_y = k + (y*Math.cos(ang)) + (x * Math.sin(ang)); // rotate/transpose ellipse points.push(new Point(rot_x, rot_y)); // save points to list drawPt(rot_y, rot_x, 2, [100, 100, 0], false); } }
... View more
04-08-2016
01:32 PM
|
0
|
3
|
2850
|
POST
|
One option is to use the find dialog. If the field names are the same in all of the feature classes, you can find: a value In: <all layers> In field:Object_ID. Once you get your results, you can right click and select. Not sure if this is what you are looking for.
... View more
03-03-2016
07:00 AM
|
2
|
0
|
3086
|
POST
|
Yes, I think client side is the way to go. I imagine it working similar to the way the "Geodesic Buffers" sample works: http://developers.arcgis.com/javascript/samples/ge_geodesic_buffers/. I will test to see if I can throw a large number of points at this sample and see how performance is. Thanks again!
... View more
01-14-2016
12:39 PM
|
0
|
0
|
1923
|
POST
|
Thank you for your response. I left some of the background out of this adventure to keep from cluttering the original post. I have tried the "Table to Ellipse" tool and you are correct, It does exactly what I need it to do, BUT, by the time i turn it into a geoprocessing service and give it a production size dataset (thousands of points), the performance starts tanking. This is the reason I'm hoping the javascript/graphic approach (or anything else) is the way to go. Thanks again.
... View more
01-14-2016
12:02 PM
|
0
|
3
|
1923
|
POST
|
Thank you. This gives me a path to go down. The rotation part of the equation is crucial for this process. Do you know if there is a supplemental process that can rotate the graphic after it is drawn based on that field? I'm sure i could convert the degrees to radians or change it from an azimuth if I had to.
... View more
01-14-2016
11:49 AM
|
0
|
1
|
1923
|
POST
|
I’ve got an array of points that include location information, as well as information that defines a geographical ellipse. Although I can plot the points via lat/lon, I’m not sure how to draw an ellipse with the data. The data includes the following information, per point (which is the center of the ellipse): Latitude Longitude Ellipse Bearing (bearing of the major axis of the ellipse from true north) Major (width in meters of the ellipse along the major axis) Minor (width in meters of the ellipse along the perpendicular axis) Sample data set: [{“lat”: 33.678265, “lon”: -86.337571, “bearing”: 76, “major”: 465, “minor”: 411}, {“lat”: 33.6779101, “lon”: -86.3448787, “bearing”: 130, “major”: 599, “minor”: 481}] It would appear from what I’ve looked at online that there are two possible solutions…either calculate a polygon that emulates the ellipse, or to draw it with a library like DOJO. I’m not skilled at custom programming, and I’m wondering if someone could help me come up with a function that accomplishes either giving a polygon that I can add to the map to emulate the ellipse, or a function that utilizes DOJO to accurately draw the ellipse to scale on the map. Thank you for any suggestions.
... View more
01-13-2016
10:31 AM
|
1
|
9
|
5531
|
Title | Kudos | Posted |
---|---|---|
2 | 03-03-2016 07:00 AM | |
1 | 01-13-2016 10:31 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|