I'm very new to Visual Earth and just starting to work my way around it (so apologies for newbie questions). I have a list of 5 pushpins located on a map and I'm trying to add a thumbnail photo in the description popup. My current code looks like:

Code Snippet

var map = null;

function setup() {
map = new VEMap('mymap');
map.LoadMap(new VELatLong(51.457530, -2.116949), 12 ,'h' , false);

var pin1 = new VEPushpin(1, new VELatLong(51.457830, -2.117849), null, 'PIN1', 'description');
var pin2 = new VEPushpin(2, new VELatLong(51.482054, -2.076239), null, 'PIN2', 'description');
var pin3 = new VEPushpin(3, new VELatLong(51.496725, -2.067087), null, 'PIN3', 'description');
var pin4 = new VEPushpin(4, new VELatLong(51.423969, -2.113903), null, 'PIN4', 'description');
var pin5 = new VEPushpin(5, new VELatLong(51.511727, -2.066765), null, 'PIN5', 'description');


So - I'm pretty sure that VEShape.SetPhotoURL(photoURL); is what I need, but I don't know where to put it... any help much appreciated...

Re: SetPhotoURL

Jared H

Your best bet for things like that is to surf around on either the interactive SDK, or the msdn documentation here. For the question you raise, it's fairly straight forward.

Create an instance of a VEShape: var myShape = new VEShape(type, points); where type would = VEShapeType.Pushpin.

Once the VEShape is instantiated, you'll have access to all it's public methods to set properties like the photoURL:


So when all's said an done, think about it in terms of adding a Shape of type VEShapeType.Pushpin to the map, rather than just a plain ol pushpin...that will make things easier when you start working with the other shape types that share the same methods.

Hope this helps!

Re: SetPhotoURL


Great thanks Jared