Can anyone help me to add a pushpin at a specific altitude in 3D. The VEShape class only takes the latitude,longitude info. and does not have any methods to specify the altitude.

Re: Adding pushpins at specific altitude in 3D

Duncan Lawler

It's not fully supported yet (and therefore not in the SDK), but you can can call SetElevation() on a shape object like this:

var veshape1 = new VEShape(VEShapeType.Pushpin,new VELatLong(43, -122));


Re: Adding pushpins at specific altitude in 3D



I can't seem to get this to work. I posted about it here... PostID=2087831&SiteID=1

Is it pretty straight forward or is there something easy I could be missing.



Re: Adding pushpins at specific altitude in 3D


Wow that's really cool, it worked for me! Now I can have little planes flying around also....

In terms of what the number actually is Duncan would have to answer but I could guess it maybe related to the altitiude setting:

"In 3D mode, sets the altitude (in meters) above the geoid in the map view."

So I suspect its not the actually sea-level altitude but rather the distance above the ground / building


Re: Adding pushpins at specific altitude in 3D



It's exciting to hear that it worked for you, it gives me hope. Surprise)

I am a JavaScript Newb, here is the code I am using. Can you see any reason that what you are doing would work and what I am doing does not work

<script src=" v=5"></script>


var map = null;

var layerid=1;

function GetMap()


map = new VEMap('myMap');



function AddMyLayer(type)


//test.value = txtSource.value;

var l = new VEShapeLayer();

var veLayerSpec = new VEShapeSourceSpecification(type, txtSource.value, l);

map.ImportShapeLayerData(veLayerSpec, onFeedLoad);


function onFeedLoad(layer)


var count = layer.GetShapeCount();

for (var i = 0; i < count; i++)


var shape = layer.GetShapeByIndex(i);

//test.value = shape.IconId;

shape.SetCustomIcon("<img src='" + shape.IconId + "'/>");


//Add a pushpin to the new layer

shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());

shape.SetTitle('My pushpin');

shape.SetDescription('This is a pushpin.');



alert('RSS or Collection loaded. There are '+layer.length+' items in this list.');



Do you have any working sample code that you are willing to publish



Re: Adding pushpins at specific altitude in 3D


Ok, that was painful as it stopped working for me also.

It would appear you need to set a customIcon


and be running in a proper webserver not from the file system

eg localhost/flyingtest.htm

Then it works, I should do a video of flying pins......