Helloe , i'm trying to create a 3D polyline , i used the following code
public static Polyline CreatePolyLine3D(MapPoint pointDepart , MapPoint pointArrive)
{
var stops = new MapPoint[] { pointDepart, pointArrive };
//Create a new Polyline
var mypolyLine = new Polyline(stops ,SpatialReferences.Wgs84);
return mypolyLine;
}
cheers
Hi Manel,
You may use Polyline.HasZ property to know whether that geometry has the z value.
Hope that helps.
Nagma
This property is used just for read not write
Envoyé de mon iPhone
Le 4 août 2017 à 18:06, Nagma Yasmin <geonet@esri.com> a écrit :
GeoNet
Re: Create a 3D Polyline
reply from Nagma Yasmin in ArcGIS Runtime SDK for .NET - View the full discussion
Hi Manel,
You may use Polyline.HasZ property to know whether that geometry has the z value.
Polyline Properties
Hope that helps.
Nagma
Reply to this message by replying to this email, or go to the message on GeoNet
Start a new discussion in ArcGIS Runtime SDK for .NET by email or at GeoNet
Following Re: Create a 3D Polyline in these streams: Inbox
Following Nagma Yasmin in these streams: Inbox
This email was sent by GeoNet because you are a registered user.
You may unsubscribe instantly from GeoNet, or adjust email frequency in your email preferences
You can use the PolylineBuilder.AddPoint(Double, Double, Double) method to add x,y and z value
PolylineBuilder Class --> AddPoint(Double, Double, Double)
MultipartBuilder(T).AddPoint Method (Double, Double, Double)
Hope that helps.
Nagma
Hello Yasmin ,
Thanks for your answer , i don't know if what i'm doing is correct actually i created a 3D MapPoints ans with this two 3D MapPoint i'll create a 3D PolyLine , i don't know if this will work , nowi want to know how i can do to display this 3D PolyLine on a Scneview here's my code :
MapPoint pointDepart = new MapPoint(-79.337936, 8.638903, 6.796, SpatialReferences.Wgs84); //start
MapPoint pointArrivee = new MapPoint(-80.035568, 9.432302, 5.8769, SpatialReferences.Wgs84);//arrival
var poly = CreatePolyLine3D(pointDepart, pointArrivee);
SceneView.Scene = new Scene();
//Create a new Graphic with the composite symbol , add it to the graphics overlay
GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
graphicsOverlay.SceneProperties.SurfacePlacement = SurfacePlacement.Relative;
SceneView.GraphicsOverlays.Add(graphicsOverlay);
Camera newCamera = new Camera(pointDepart, 1500, 0, 80, 0);
SceneView.SetViewpointCameraAsync(newCamera);
Please Help
Thanks
Hello Yasmin ,
Thanks for your answer , i don't know if what i'm doing is correct actually i created a 3D MapPoints ans with this two 3D MapPoint i'll create a 3D PolyLine , i don't know if this will work , nowi want to know how i can do to display this 3D PolyLine on a Scneview here's my code :
MapPoint pointDepart = new MapPoint(-79.337936, 8.638903, 6.796, SpatialReferences.Wgs84); //start
MapPoint pointArrivee = new MapPoint(-80.035568, 9.432302, 5.8769, SpatialReferences.Wgs84);//arrival
var poly = CreatePolyLine3D(pointDepart, pointArrivee);
SceneView.Scene = new Scene();
//Create a new Graphic with the composite symbol , add it to the graphics overlay
GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
graphicsOverlay.SceneProperties.SurfacePlacement = SurfacePlacement.Relative;
SceneView.GraphicsOverlays.Add(graphicsOverlay);
Camera newCamera = new Camera(pointDepart, 1500, 0, 80, 0);
SceneView.SetViewpointCameraAsync(newCamera);
Please Help
Thanks