deeplights


Hi,

Can anyone help me in adding a custom pushpin to the 3D map control. I have tried the following but the icon is still not visible

map = new VEMap('myMap');
var latlong = new VELatLong(7,81);
map.LoadMap(latlong,11,'r',false,VEMapMode.Mode3D,true);
var shape = new VEShape(VEShapeType.Pushpin,latlong);
shape.SetCustomIcon("urldir/urlimage");
map.AddShape(shape);

This snippet doesn't work. There is no error as such but the icon i am trying to show is not visible. This works well if i change the mode to 2D.

I then had a look at the SetCustomIcon API method which said that i should use the VECustomIconSpecification class to make that image visible in 3D. I was not able to understand the class. But still I tried the following but didn't worked too.

map = new VEMap('myMap');
var latlong = new VELatLong(7,81);
map.LoadMap(latlong,11,'r',false,VEMapMode.Mode3D,true);
var shape = new VEShape(VEShapeType.Pushpin,latlong);
var customIconSpec = new VECustomIconSpecification(null,"urldir/urlimage","Test",null,false,true,false,10,null,null,null,null);
shape.SetCustomIcon(customIconSpec);
map.AddShape(shape);

It would be grateful if i can get some useful reply.




Re: Adding custom pushpin in 3D map

Duncan Lawler


Your second example should work if you use a fully qualified URI. The 3D control doesn't know the base site URI. So change your URI to http://mysite/urldir/urlimage