Which code segment should you use?

You need to add a default pushpin as a shape to the base map layer at a specific latitude and longitude. Which code segment should you use?

You need to add a default pushpin as a shape to the base map layer at a specific latitude and longitude. Which code segment should you use?

A.
var shape = map.AddPushpin(map.GetCenter()); shape.SetTitle(‘My pushpin’); shape.SetDescription(‘This is a default shape’);

B.
var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter()); shape.SetTitle(‘My pushpin’); shape.SetDescription(‘This is a default shape’); map.AddShape(shape);

C.
var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(0,0)); shape.SetTitle(‘My pushpin’); shape.SetDescription(‘This is a default shape’); shape.SetPoints([new VELatLong(latitude,longitude)]); map.AddShape(shape);

D.
var shapeLayer = new VEShapeLayer(); map.AddShapeLayer(shapeLayer); var shape = new VEShape(VEShapeType.Pushpin, new VELatLong(latitude,longitude)); shape.SetTitle(‘My pushpin’); shape.SetDescription(‘This is a default shape’); shapeLayer.AddShape(shape);



Leave a Reply 0

Your email address will not be published. Required fields are marked *