Reputation:
I used the Geodesic buffers sample code of ArcGIS from the following link
https://developers.arcgis.com/javascript/3/jssamples/ge_geodesic_buffers.html
Setup the proxy. it worked fine and showed all the points with features.
It was getting the points from this link http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv"
but I wanted to show points from my own CSV file but I didn't find a way to do in this sample code, then I used CSVLayer to show points which worked fine to show my points but it doesn't have features what was in Geodesic buffer. I couldn't add feature layer to it because map didn't contain graphics.
Could you please provide me a way that I can show my own points, just like Geodesic buffer sample does?
Upvotes: 0
Views: 134
Reputation: 1
If you are using ArcGIS Runtime SDK for .NET v100, you can parse csv file to get lat/lon values, use GeometryEngine.BufferGeodetic method and GraphicsOverlay to display result.
var overlay = MyMapView.GraphicsOverlays[0];
foreach (var line in result)
{
var longitude = Convert.ToDouble(line["longitude"]);
var latitude = Convert.ToDouble(line["latitude"]);
var mp = new MapPoint(longitude, latitude, SpatialReferences.Wgs84);
var buffer = GeometryEngine.BufferGeodetic(mp, 2000, LinearUnits.Kilometers);
var graphic = new Graphic(buffer, new SimpleFillSymbol(SimpleFillSymbolStyle.Solid, Colors.Blue, null));
overlay.Graphics.Add(graphic);
}
Upvotes: 0