Select to view content in your preferred language

Insert User Control as graphic or annotation at a given MapPoint

1619
3
05-17-2012 04:00 AM
ErnieSalazar
Regular Contributor
Hi Guys.

If I create a user control that contains, say, a panel with a text box and some text, is it possible to insert it into a Map control at a specific point dictated by a MapPoint (or extracted XYs)?

Basically, I want the user to be able to click a point graphic and have a popup show up next to it with information and then close it when they click the point again.  A MapTip would not work in this case.

Thanks
Ernie
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
The InfoWindow is likely what you need.
Look at this sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#InfoWindowSimple when you click outside of US you get a panel with X,Y coordinates.
0 Kudos
ErnieSalazar
Regular Contributor
Thanks Dominique.  That could work but that sample shows that only one can be drawn at a time.  Looks like the have the info window created at design time and then just move it around at run time.  That would be ok but I would like to be able to draw more then one at a time.  It would be better if I could somehow insert an object a run time over and over again based on a user control.  Looks like I will ahve to fool around with a bunch of graphic entities to get it to work.

Ernie
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Looks like the have the info window created at design time and then just move it around at run time. That would be ok but I would like to be able to draw more then one at a time.


You are right. In this case, you likely need an element layer that can contain any UI elements.

See sample here : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ElementLayer
0 Kudos