spacer1
spacer2 1_1 1_2
2_1
 Subscribe
 The MP2K Update!
 
 
 
 Magazine
Front Cover
What's New
Articles
News
Sample Data
Gallery
Advertise
About
 Features
MapPoint 2013
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 Earlier Content
Past News Items
Past What's New Announcements
 Sponsors
 Order

MapPoint 2013

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
SVG Tutorials
MapPoint

Map Visitors

  MAPPOINT Q & A  

Top | Post New Question | Read All | MP2K Asks Microsoft

338 david isom - August 19, 2001

I have read you can zoom the map to any lat/long from code once done can you display an icon at that specific point ? What is the likely overhead of doing this many times in a small area leaving thse icons on the map david

Answer:

To do this, simply add a pushpin. The following code does the trick:
(MapPoint must be started)

   ' Attach to running instance of MapPoint
   Set oMpApp = GetObject(, "MapPoint.Application")
   
   ' Retrieve the active map
   Dim oMap As MapPoint.Map
   Set oMap = oMpApp.ActiveMap
   
   ' Set a pushpin at 49 North, 10 East
   Dim oPin As MapPoint.Pushpin
   Set oPin = oMap.AddPushpin(oMap.GetLocation(49, 10))
   
   ' Set the symbol property of the pushpin
   oPin.Symbol = 42
Check out the documentation of the Symbol property of the Pushpin object for available symbols. MapPoint 2002 supports adding your own icons, their symbol codes start at 256.

The overhead / efficiency largely depends on type of CPU and amount of memory available.

-gk

Post New Answer / Follow-up


Google
 
MP2Kmag Internet


 Recent Discussion
 Resources


Want Your Site To Appear Here?

   © 1999-2012 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009/2010/2011/2013 are either trademarks or registered trademarks of Microsoft.