Hi,
I want to let user edit a feature . (for example a road)
When I add target feature to EditOverlay.EditShapesLayer.InternalFeatures user have to click on feature then edit points appear.
Before user’s click =>
After user’s click =>
How can I appear edit points programmatically ?
Edit Internal Features
Hi Shaahin,
Thanks for your post, attached code could show a basic idea of achieving this functionality, would you please try it?
Hope it helps
Summer
Post11423.txt (3.95 KB)
Thanks for your response .
I couldn’t create project from attached code .
Would you please attach the project ?
Many thanks.
It was very helpful.
What’s the point of this line ?
if (count == 2) break;
else
In below function =>
<feature><feature>
private void GetEditPoint(GeoCollection<
Feature
> editFeatures, IEnumerable<
Feature
> pointFeatures)
{
int count = 0;
foreach (Feature feature in pointFeatures)
{
if (count == 2) break;
else
{
foreach (Feature f in editFeatures)
{
if (f.GetWellKnownText() == feature.GetWellKnownText())
{
ControlPoints.Add(f);
count++;
}
}
}
}
}
I mean why did you limit number of points to 2 points ?</feature></feature>
Hi Shaahin,
"if (count == 2) break;" means that the first two vertexes on a shape will be choosed to edit.
if you have any more question , please feel free to let us know.
Best Regards
Summer
Hi
Is it possible to show road direction using the example which attached by Summer?
Thanks
Shahin
Hi Shaahin,
How would you want to show the road direction?
Do you want to draw a arrow on road for show that under edit mode or render mode?
If you have a image shows how it would looks like should be better.
Regards,
Don
Hi Don
Thanks for your following this up. Please have a look on the below image:
I want to show an arrow (or what way is possible to specify road link direction) on the start or end point of the road link based on user’s choice. (A>B or B>A) it’s not editable through the map, it can just be updated using the buttons which intended on the above of the map.
Best regards,
Shahin
Hi Shaahin,
We don’t have existing function for that. But I think you can try to implement that like this:
1. Get your line shapes.
2. Calculate their start point or end point, calculate the direction and saved it in feature column value.
3. Add the new shapes to a inmemoryFeatureLayer.
4. Render the points by image point(your arrow), rotate the image to the direction.
It looks your requirement have some same point with weather vane, you can find some related topic maybe helpful.
Regards,
Don