Community of VE/MapPoint Users and Developers
This is a discussion on Programming multiple pushpins with Mappoint webservice within the MapPoint Web Service and Virtual Earth forums, part of the Map Forums category; Hi, I am a complete beginner (2 weeks learning) and I'm trying to create a map with multiple pushpins with ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Programming multiple pushpins with Mappoint webservice I am a complete beginner (2 weeks learning) and I'm trying to create a map with multiple pushpins with their attributes based on data read from a database however it doesnt seem to work, the code I am using is below, if anyone knows how to fix this or a better method (with example code) I would be extremely grateful. Thanks, Note: I have got all the other map attributes eg. mapoptions etc, I have just included the relevant code here. Dim Conn As OleDbConnection Dim Cmd As OleDbCommand Dim strSql As String Dim reader As OleDbDataReader Dim i As Integer Dim t As Integer t = 0 i = 0 Conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("loneworkers.mdb")) Cmd = New OleDbCommand(strSql, Conn) strSql = "SELECT * FROM TableName" Cmd = New OleDbCommand(strSql, Conn) Try Conn.Open() reader = Cmd.ExecuteReader() 'Loop through the returned records While reader.Read() i = i + 1 t = t + 1 Dim latlongs(i) As LatLong latlongs(i) = New LatLong latlongs(i).Latitude = reader("UpdateLocationX").ToString() latlongs(i).Longitude = reader("UpdateLocationY").ToString() Dim myPushPins(t) As Pushpin myPushPins(t) = New Pushpin myPushPins(t).Label = reader("firstname").ToString() & " " & reader("surname").ToString() myPushPins(t).IconName = t myPushPins(t).IconDataSource = "MapPoint.Icons" myPushPins(t).LatLong = latlongs(i) End While 'Close the reader object reader.Close() |
![]() |
| Tags |
| mappoint, multiple, programming, pushpins, webservice |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multiple Pushpins for One Address, Possible? | Jeff Nelson | MapPoint 2006/2009 Discussion | 6 | 05-31-2005 04:20 PM |
| Changing symbols of multiple pushpins. | Anonymous | MapPoint 2006/2009 Discussion | 5 | 02-28-2005 02:57 AM |
| Creating a map with multiple pushpins | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-26-2004 07:08 AM |
| DataMapping with multiple pushpins at a location | jwhitt4u | MapPoint 2006/2009 Discussion | 0 | 09-08-2003 12:35 PM |
| Multiple Pushpins | LThomas999 | MapPoint 2006/2009 Discussion | 1 | 04-01-2003 06:14 AM |