Select to view content in your preferred language

3d symbols for points on graphics layer

3617
3
09-03-2015 04:29 AM
johnbrosowsky
Frequent Contributor

I can see how to add 2d symbols for points on a graphics layer using SimpleMarkerSymbol but is it possible to add 3D symbols for points on graphics layer (not feature layer) using:

var symbol = new PointSymbol3D({
  symbolLayers: [new ObjectSymbol3DLayer({
    width: 5     //width of object in meters
    height: 10,  //height of object in meters
    depth: 15,   //depth in meters
    resource: { primitive: "cube" },
    material: { color: "red" }
  })]
});

Tags (1)
0 Kudos
3 Replies
ReneRubalcava
Honored Contributor

Your code looks legit.

Here you go

JS Bin - Collaborative JavaScript Debugging

  var objectSymbol = new PointSymbol3D({
    symbolLayers: [new ObjectSymbol3DLayer({
      width: 700,
      height: 1000,
      resource: {
        primitive: "cone"
      },
      material: {
        color: "#FFD700"
      }
    })]
  });
  pointGraphic = new Graphic({
    geometry: point,
    symbol: objectSymbol
  });

Here is sample using your code, with some size changes to make it more visible at this scale

JS Bin - Collaborative JavaScript Debugging

ChristophKisfeld2
Deactivated User

Is there a way to use custom 3D models at this time with the href attribute? I tried several models in Wavefront .obj format, some I made myself in Blender and others I got from websites, at different scales, placements, etc. but none will show up except the basic primites described in the 4.0beta1 docs. I'm not sure why this is the case and would like to know if it requires a special format or if it's just not implemented currently.

DarkoRadiceski
Emerging Contributor

I also tried few different options here to set the href. I also tried to point to an already published scene layer but didnt work - drill through the hierarchy in the url.

Would be great if this is possible.

The reason i am asking is because i have a point file that in Pro if a set the same 3d model marker symbol ArcPro doesnt allow me to publish it. Think of a tree point layer and use the same tree for all the points. If i want this to work in Pro i would have to rename all the models from model 1 to 100 if i had 100 trees.

I have the x,y,z point so would be great to set the 3d model marker through code

0 Kudos