Adding frameworkelement to a graphicoverlay

363
5
07-18-2017 10:15 AM
Highlighted
New Contributor

Hello,

i'm wondering if there is a way to add a frameworkelement(custom user control) and add it to be as part of one of the graphicoverlays in the project? 

Currently I'm using just the X, Y coordinates to add the usercontrol and draw it over the map(just overlapping it).

is there any other way to achieve this?

Tags (2)
Reply
0 Kudos
5 Replies
Highlighted
MVP Regular Contributor

You would need to add as an item in the MapView:Overlays collection not in a GraphicsOverlay collection

GeoView.SetViewOverlayAnchor(popupView, e.Location);
MapView.Overlays.Items.Add(popupView);

Where popupView is a UserControl.  Positioning is a little tricky

Highlighted
New Contributor

Thanks for the reply. 

I forgot to mention that I'm using a 3D map(SceneView) and not the 2D map(MapView). is there any way to do it for it?

Thanks.

Reply
0 Kudos
Highlighted
MVP Regular Contributor

Sorry I have not done anything with SceneView only 2D.

Good luck

Reply
0 Kudos
Highlighted
New Contributor

Thanks. 

Anyone else knows how can I achieve it in 3D? 

Reply
0 Kudos
Highlighted
Occasional Contributor II

It's long time ago, and I have no idea until when, but now it also works for a SceneView.

Reply
0 Kudos