MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




cant create a Puspin-Object

This is a discussion on cant create a Puspin-Object within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, i am using the mappoint control of mappoint european 2004 to create an application I want to use pushpins ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

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 03-10-2005
Junior Member
White Belt
 
Join Date: Mar 2005
Posts: 5
cant create a Puspin-Object

Hello,

i am using the mappoint control of mappoint european 2004 to create an application


I want to use pushpins to show data on the map
in some exsamples i saw code like:
Quote:
Dim myPushpins(1) As Pushpin
myPushpins(0) = New Pushpin()
myPushpins(0).IconDataSource = "MapPoint.Icons"
myPushpins(0).IconName = "31"
myPushpins(0).Label = "Start"
But it doesnt work!
Here is my Code

Code:
        Dim pinCounter As Integer
        pinCounter = 0

        objRecordSet.MoveFirst()

        Dim myPushpins(pinCounter.MaxValue - 1) As MapPoint.Pushpin
        Do While Not objRecordSet.EOF

            myPushpins(pinCounter) = New MapPoint.Pushpin  '<<--- ? "New cannot be used with an Interface..." ?

            objRecordSet.MoveNext()
            pinCounter += 1

        Loop
plz help me, what sould i do?
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 03-10-2005
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
What language are you programming in?
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
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 03-10-2005
Junior Member
White Belt
 
Join Date: Mar 2005
Posts: 5
VB.NET
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 03-10-2005
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
Give this a try

Code:
Try
 Dim omap As MapPoint.Map
 Dim oloc As MapPoint.Location
 Dim opin As MapPoint.Pushpin

 omap = AxMappointControl1.ActiveMap 
 oloc = omap.GetLocation(51.577141, 0.291178, 250)
 opin = omap.AddPushpin(oloc, "Pushpin1")
 opin.BalloonState = MapPoint.GeoBalloonState.geoDisplayBalloon
 opin.Location.GoTo()

Catch ex As Exception
  MessageBox.Show(ex.Message)
End Try
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 03-11-2005
Junior Member
White Belt
 
Join Date: Mar 2005
Posts: 5
thx
thats the way i tried first,

but i want to set an own icon and a Label wich shows the data on the map

is it possible somehow?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 03-11-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Hi,

Code:
Symbol NewSymbol = MP.ActiveMap.Symbols.Add("c:\\test.bmp");
PP.Symbol = NewSymbol;
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
create, puspinobject


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
How to get Lat, Lon from a Location object? Van MapPoint 2006/2009 Discussion 7 02-01-2005 03:49 PM
c# zoom to object starbuck MapPoint 2006/2009 Discussion 4 12-17-2004 05:32 PM
Loading some object from the map Anonymous MapPoint 2006/2009 Discussion 0 07-25-2003 06:23 AM
route object to drawing object Anonymous MapPoint 2006/2009 Discussion 1 05-09-2003 11:29 PM
DataMap object Anonymous MapPoint 2006/2009 Discussion 2 08-30-2002 06:04 AM


All times are GMT -5. The time now is 09:53 AM.


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