3D scene: How to apply height to a Graphic/PictureMarkerSymbol

212
2
Jump to solution
08-31-2017 05:48 AM
NorbertThoden
Occasional Contributor III

I use a map (3D) and a scene (3D)

To display an object i use the PictureMarkerSymbol and assign an image to it.

By applying the geometry i can place the object on the map - fine.

But in the 3d context i would like to apply the z-value to the geometry/object too.

How can i do this?

The DictionaryRenderer displays a line to the bottom (using alternating colors)

I would like to consider this as a next step - if possible.

Any hints?

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
LukeSmallwood
Esri Contributor

Hi Norbert, for this you would need to make use of the surfacePlacement methods on LayerSceneProperties. For example, the code below places a picture marker symbol at a height of 1000m above Edinburgh:

 PictureMarkerSymbol* pms = new PictureMarkerSymbol(myImageUrl, this);
  Graphic* g = new Graphic(Point(-3.1883, 55.9533, 1000., SpatialReference::wgs84()), pms, this);
  overlay->graphics()->append(g);
  LayerSceneProperties sceneProps = overlay->sceneProperties();
  sceneProps.setSurfacePlacement(SurfacePlacement::Relative);
  overlay->setSceneProperties(sceneProps);

Note that the sceneProps are returned by value not by reference so you need to set them back onto the overlay.

Hope that helps,

Luke

View solution in original post

2 Replies
LukeSmallwood
Esri Contributor

Hi Norbert, for this you would need to make use of the surfacePlacement methods on LayerSceneProperties. For example, the code below places a picture marker symbol at a height of 1000m above Edinburgh:

 PictureMarkerSymbol* pms = new PictureMarkerSymbol(myImageUrl, this);
  Graphic* g = new Graphic(Point(-3.1883, 55.9533, 1000., SpatialReference::wgs84()), pms, this);
  overlay->graphics()->append(g);
  LayerSceneProperties sceneProps = overlay->sceneProperties();
  sceneProps.setSurfacePlacement(SurfacePlacement::Relative);
  overlay->setSceneProperties(sceneProps);

Note that the sceneProps are returned by value not by reference so you need to set them back onto the overlay.

Hope that helps,

Luke

View solution in original post

NorbertThoden
Occasional Contributor III

Hi Luke!

Thanks for your perfect answer 🙂

0 Kudos