Hello
I was wondering if there is a way to find the intersection between a certain Point of interest and a street and to be highlighted just like street intersection?
Thanks
Saddam
Hello
I was wondering if there is a way to find the intersection between a certain Point of interest and a street and to be highlighted just like street intersection?
Thanks
Saddam
Hello saddam,
Thanks for your post, you can use pointshape.Intersects function to handle this scenario, please see the code below:
LineShape l = new LineShape();
PointShape p = new PointShape();
if (p.Intersects(l))
{
//hightlight l or do something else
}
I hope this can help.
Regards,
Gary
Hello Gary
thanks for the reply but i was wondering if you would explain more to me as my senario is that i input the name of the street into textbox1 and name of the poi into textbox2 and if it intersects the map would zoom in on the intersection
Thanks Saddam
Hello saddam,
Here is some fake code, but I think you can work it out.
//get the name of street from textbox1
InMemoryFeatureLayer i = winformsMap1.FindFeatureLayer("find the layer contains this street");
LineShape street = i.FeatureSource.GetFeaturesByColumnValue("streetname", "streetname");
//get the name of point from textbox2 and get the PointShape just like above
PointShape POI = //get it like above.
if (POI.Intersects(street))
{
//zoom in and center to the street
winformsMap1.ZoomIntoCenter(percentage, street)
}
Let met know if you still have queries.
Regards,
Gary
Gary
i resolved the issue i was having thanks very much for helping, but is it possible to highlight a feature?
Thanks
Saddam
Hello saddam,
Yes, please see this sample, it will show you how to highlight a feature:
wiki.thinkgeo.com/wiki/Map_Suite_De...ouse_Hover
Feel free to let us know your questions.
Regards,
Gary