MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Programming multiple pushpins with Mappoint webservice

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint Web Service and Virtual Earth

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-14-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Programming multiple pushpins with Mappoint webservice

Hi,
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()
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
mappoint, multiple, programming, pushpins, webservice


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 11:36 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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