Community of VE/MapPoint Users and Developers
This is a discussion on addpushpin - need help to get started within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I've only been programming for about 2 years but have done quite a bit of work with another map ocx, ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| addpushpin - need help to get started I am looking for someone to give me the 'simplest' example possible of adding a pushpin, based upon lat an lon (using the MappointControl1.control). This will be very much appreciated if I could see how to just only open a form and plot a single location (without all the other partial code snippets involved. assume lat 26.10000 lon -81.10000 and fill in the form load event.......... Private Sub Form_Load() End Sub |
| |||
|
Hi, Very simple Code: double lat= 26.10000;
double lon = -81.10000;
Location loc = mp.ActiveMap.GetLocation(lat, lon, 1);
Pushpin pp = mp.ActiveMap.AddPushpin(loc, "");
loc.GoTo();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Quote:
Wilfried - Hi. Actually, what I was looking for was just the simplest (standalone) example of what would work, if I was to paste the example in the form load event. Just so that I can see that it works. and how the map control, location and pushpin objects are referenced. The above code looks good and easy to understand, but won't, by itself plot the pushpin. Example: Private Sub Form_Load() ... ... End Sub |
| |||
|
Hi, I'm not sure I understeand your question. I tryed the code in a simple project and it works. So I dont understeand the prolbem. Can uou clarify what you means ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Quote:
------------------------------------------------------ Private Sub Form_Load() Mappointcontrol1.NewMap geoMapNorthAmerica ... <--------- ' whatever references are necessary for loc, pp, ... <---------- ' so that the code following with plot a pushpin double lat= 26.10000; double lon = -81.10000; Location loc = mp.ActiveMap.GetLocation(lat, lon, 1); Pushpin pp = mp.ActiveMap.AddPushpin(loc, ""); loc.GoTo(); End Sub |
| |||
|
Hi, I see. Whell the example I have given mp is the name of my MappointControl. So except loading the map what you already do nothing special to iniitalize. Does this answer your question ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Quote:
|
| |||
|
hi, glad it work for you
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Developing with MapPoint and Excel - Getting Started | Eric Frost | MP2K Magazine Articles | 9 | 1 Week Ago 10:52 AM |
| Getting Started with the Virtual Earth Map Control | Eric Frost | MP2K Magazine Articles | 0 | 08-02-2005 03:39 PM |
| Getting Started with VB6 and MapPoint 2004 | takk | MapPoint 2006/2009 Discussion | 3 | 12-08-2004 02:20 PM |
| AddPushPin | Anonymous | MapPoint 2006/2009 Discussion | 0 | 03-01-2004 10:41 AM |
| addPushpin | nringdahl | MapPoint 2006/2009 Discussion | 1 | 01-27-2004 09:09 AM |
Madeira Flights
The historic features of Madeira are complimented by top-notch facilities and plenty of water sports activities. Book Madeira flights online today.
Personal Travel Agent'
Whatever your travel needs your personal Travel Agent can help. Travel Counsellors are a Queen's Award winning Travel Agent
Cape Town Flight
Book a Cape Town Flight for great value when you book through dealchecker.co.uk. It doesn't take long to find the latest great deals for you.
Holidays in Dubai
Holidays in Dubai are an eclectic mix of the ancient and the modern. Discover an oasis of luxury amid the Arabian desert. Book here now!
Portugal
As well as providing some great weather Portugal has much to offer culturally. There are numerous museums, monuments and places of historical interest to explore. Despite the rich history there is a buzzing nightlife and great shopping too.
Price Compare
Visit Travel.co.uk for and compare not only price, but also the wide variety of options available.
Fuerteventura Holidays
Visit one of the closest Canary Islands to Africa! Book Fuerteventura holidays at On The Beach!