hello,
i have calculated a route. then find mid point of the route by using GetpointOnALine method.
now i want to create a buffer around that midpoint. but it give error when my app runs
"Object reference not set to an instance of an object."
my code is as follow
InMemoryFeatureLayer buffer = (InMemoryFeatureLayer)winformsMap1.FindFeatureLayer("Buffer");
PointBaseShape baseshape = (PointBaseShape)center.InternalFeatures["Mid"].GetShape();
MultipolygonShape buffershape = baseshape.Buffer(100,8, BufferCapType.Butt, GeographyUnit.DecimalDegree, DistanceUnit.Kilometer);
Feature bufferFeature = new Feature(buffershape.GetWellKnownBinary(), "BufferFeature");
if (!buffer.InternalFeatures.Contains("BufferFeature"))
{
// center.InternalFeatures.Add("Mid", mid);
buffer.InternalFeatures.Add("BufferFeature", bufferFeature);
}