Question : Adding additional pushpins to virtual earth map

Dear Experts

I am using the code as per below to add a map with a single marker pin.  I would like to be able to add additional pins to the map with set lat and long values.

Can anyone advise on how to achieve this?

Thanks
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:

Answer : Adding additional pushpins to virtual earth map

Your best resource for working with the Virtual Earth map control is the Virtual Earth SDK:

http://dev.live.com/Virtualearth/sdk/#

For your specific query, look under the "Customize Shapes" section for information on how to manage (add, edit, delete) custom layers, shapes and pushpins.

From the VE SDK, here is the relevant code snippet for adding Pushpins to a VE Map Control:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
function AddPushpin()
{
    var shape = new VEShape(VEShapeType.Pushpin, map.GetCenter());
    
    //Set the icon
    shape.SetCustomIcon(icon);
    
    //Set the info box
    map.ClearInfoBoxStyles();
    
    shape.SetTitle("

Custom Pin

"); shape.SetDescription(infobox); //Add the shape the the map map.AddShape(shape); }
Random Solutions  
 
programming4us programming4us