MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




Adding a PushPin from a Long/Lat position

This is a discussion on Adding a PushPin from a Long/Lat position within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi all Background: I have vehicles in the field and they report their long,lat positions to a sqlDatabase through GPRS. ...


Go Back   MapPoint Forums > Map Forums > MapPoint Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-03-2005
Junior Member
White Belt
 
Join Date: Oct 2005
Posts: 2
Adding a PushPin from a Long/Lat position

Hi all

Background: I have vehicles in the field and they report their long,lat positions to a sqlDatabase through GPRS.

What I want to know is how do I use this long/lat positions to add a pushpin or any type of shape onto my map?

Im not using the webservice put the MappointControl object with a VB form.

Thanx

Z
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 10-05-2005
calv1ns's Avatar
Member
Green Belt
 
Join Date: Mar 2005
Posts: 91
AddPushPin

Zadic

Here is a VB6 Funciton that will do what you want:

Quote:
Public Function addpushpin(wk_lat As Double, wk_long As Double, wk_type As Integer, wk_name As String) As Integer
Dim this_loc As MapPoint.Location
Dim this_pin As MapPoint.Pushpin
'note myobj is a global definded as Dim myobj as MapPoint.Map
'Function: addpushpin returns +1 on success -1 on failure

myapp.Visible = True

On Error GoTo myErr:
wk_istat = 1
Set this_loc = myobj.GetLocation(wk_lat, wk_long, 0)
Set this_pin = myobj.addpushpin(this_loc, wk_name)
this_pin.Symbol = wk_type

myErr:
If Err.Number <> 0 Then
On Error GoTo 0
Debug.Print Err.Number, Err.Description
Err.Clear
wk_istat = -1
End If
addpushpin = wk_istat
End Function
Ciao,
__________________
Calv1ns
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 10-06-2005
Junior Member
White Belt
 
Join Date: Oct 2005
Posts: 2
Thanx it worked!!

Zadic
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
adding, long or lat, position, pushpin


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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Adding custom field to a Pushpin marcocim MapPoint Desktop Discussion 1 06-12-2005 04:13 PM
Adding Pushpin Anonymous MapPoint Desktop Discussion 5 03-11-2005 07:23 AM
Adding pushpins by lat/long or address using MPC in MSAccess GM MapPoint Desktop Discussion 0 11-01-2004 12:00 PM
Adding custom pushpin symbol M.Vrolijk MapPoint Desktop Discussion 2 09-20-2004 06:55 AM
Check error with VBA before adding pushpin Anonymous MapPoint Desktop Discussion 2 03-24-2004 09:36 AM


All times are GMT -5. The time now is 07:50 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
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 55 56 57 58 59 60 61 62 63 64 65 66 67