PolylineDashMaterialProperty not working

12 views
Skip to first unread message

kfirbene

unread,
Jan 2, 2018, 8:04:11 AM1/2/18
to cesium-dev
Hi,

I am trying to create a dashed polyline and I run into a weird issue.
The material:

var myMaterial = new Cesium.PolylineDashMaterialProperty({
                          color: Cesium.Color.WHITESMOKE,
                          gapColor: Cesium.Color.TRANSPARENT
});

The poly line:

var myPolyline = Cesium.entities.add({
       id: name + '_polyline',
       height: 0,
       polyline: {
                       positions: [new Cesium.Cartesian3(uPosition.x, uPosition.y, uPosition.z),
                                         new Cesium.Cartesian3(newCenter.x, newCenter.y), newCenter.z)],
                       width: 3,
                       material : myMaterial
       }
});

The issue is that when I put a break point at the material, I get there, but it is hanging there and not reaching the myPolyline creation when I continue.

Any idea?

Gabby Getz

unread,
Jan 2, 2018, 3:53:49 PM1/2/18
to cesium-dev
Hi there,

Looks like you have an extra parenthesis:

new Cesium.Cartesian3(newCenter.x, newCenter.y), newCenter.z)

Make sure your code is syntactically correct, then see if you're still having any problems.

Thanks,
Gabby
Reply all
Reply to author
Forward
0 new messages