0

I'm working on a UWP project where I render 3D content on top of a BingMaps map (so that it looks like these 3d things are on the map).

To clarify: I'm actually rendering my 3d content using directx in a seperate (partially transparent) control that lies on top of the map. So it's not rendered within or as part of the mapcontrol or anything, it's completely seperate. (I made methods that transfer the geo/gps coordinates to the 3d coordinate system I use in Directx, and I make the camera in directx match the map's camera)

I have the map camera tilted, and I want to know at what distance it clips the map, so that I can clip my 3d content at the same distance.

But I can't seem to find that property anywhere. Does anyone know?

Stef
  • 315
  • 3
  • 14

1 Answers1

1

In general, what you're describing isn't really possible - there is no single clip distance for the map. You have a variety of content in the foreground that might occlude some of your content and there really isn't a far clip plane visible - map data just vanishes over the horizon. If you have 3D content that you want to display as part of the world space, the only way to do that would be to render it as part of the overall 3D scene. There's no way to add 3D objects with the existing API, but it's something under consideration.

Duncan Lawler
  • 1,772
  • 8
  • 13
  • Yeah, I found no way to add my 3d stuff to the map, so I'm actually rendering my 3d content using directx in a seperate (partially transparent) control that lies on top of the map. I'm just asking how to get/calculate the distance at which the map stops (when viewing it tilted). – Stef Nov 18 '16 at 09:46
  • Oh, also, I'm using the flat map (dunno what's it called), not the 3d map with elevation and buildings and stuff. Things don't vanish over the horizon here, the map is just clipped at a distance. – Stef Nov 18 '16 at 09:55
  • 1
    Ah, that's an artifact of an old map rendering engine that will be going away soon, so I wouldn't code your app around that. There's no way to get the clip distance right now anyway. – Duncan Lawler Nov 18 '16 at 17:22
  • Ah ok, thanks for the info. Any idea on when that will be? And does that also mean that the map won't be flat anymore, but curve according to the earth's curving? – Stef Nov 21 '16 at 08:51
  • Correct - the map will show a true terrain model. You should see this showing up in insider preview builds soon. – Duncan Lawler Nov 21 '16 at 21:06
  • I actually just meant earth curving (as a sphere-like object), not terrain-elevation. I expect/hope it will still be a possible to get a map without elevationdata. – Stef Nov 24 '16 at 16:03
  • I noticed in the most recent insider preview that the mapcontrol looks very different. I was wondering if these changes will be available in the Windows 10 Creators Update? – Stef Mar 17 '17 at 14:51
  • That's correct, these changes will ship as part of the Creators update – Duncan Lawler Mar 17 '17 at 17:44
  • Alright, thanks. One last question (atleast I think), do you know if there is some documentation or code samples or anything about these changes available somewhere? – Stef Mar 20 '17 at 13:31
  • MSDN documentation should be updated shortly and there will be blog posts highlighting the major differences. – Duncan Lawler Mar 20 '17 at 16:39