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

MapPoint 2006

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
ViaVirtualEarth
SVG Tutorials
MapPoint

Map Visitors

 Direct Media

SMALL BUSINESS IT
In a world of faceless organisations, Connect provides a personal service to help you get rid of any IT frustrations.

printer cartridges
Don't settle for any old supplier. Get the best ink for the best price. See our great range of printer cartridges at competitive prices.

Cheap flights to Greece
Check Holiday Hypermarket for the latest cheap flights to Greece. Save your money for memorable souvenirs. See online today!

Holiday to Greece
Book a holiday to Greece today! There is something for everyone with a famous ancient history but also fantastic weather.

property Bulgaria
Ski resort and beach apartments for sale in beautiful Bulgaria. Visit online For further details.

Holiday Deals
Don't miss out on our fantastic holiday deals to a range of exotic destinations. We use over twenty top travel agents and tour operators to bring you great value holiday deals.

Cheap Turkey Holidays
The best time of year to sneak in cheap Turkey holidays is during the off-peak season. Check out the great deals available during April, May or October. For other tips on how to bag a great value holiday simply check online at ulookubook.com

  ARTICLES  


Automating MapPoint with the .NET SDK

As Gilles Kohl showed in a previous article, it's possible to program MapPoint with only the free .NET Framework SDK. This article illustrates a simple program using this technique for generating images from MapPoint.

Much like ASP.NET, desktop application developers have a choice of using one of the tools in Visual Studio .NET (C#, VB.NET, etc.) or simple a text editor for developing programs using the .NET framework. Visual Studio supports drag and drop/automatic code generation, debugging support, Intellisense, and a host of other valuable programing features. Writing programs with a text editor and compiling at the command-line provides little of that and can be analogized as freely available 'water' to Visual Studio's 'Coke' (or Jamba Juice for the health-concious :-)..

In this article we will compile a simple program written with the humble TextPad text editor which generates images of the U.S. states. First, let's take a look at the code:

This is placed in a text file with a .vb extension and along with a few supporting files is all that is need to compile at the command line. First, review the prerequisites as outlined by Gilles in the previous article. To compile this program you will need the .NET platform SDK.

Then, download the code and supporting files and extract to a working directory. Note that although I don't use it here, I've included the MPToolbox library for good measure. To successfully compile and run the program, you will also need to generate the MapPoint.dll to enable .NET to communicate with MapPoint. This is done at the command prompt by typing
TLBIMP "C:\Program Files\MapPoint 2002 North America\MPNA81.TLB"
(substitute the path to your MapPoint installation/the .tlb file as necessary).

Now, to compile the program, type
VBC @GenStates.rsp
at the command prompt. If you've kept your fingers crossed this whole time, you should be rewarded with a nifty little executable for generating images of the 50 U.S. States (plus Washington D.C.). A gallery of the images is posted here.

Discuss this story in the forum.

Author: Eric Frost
Email: website(AT)mp2kmag.com
URL: http://www.mp2kmag.com
Eric is Editor and Publisher of MP2K Magazine and is a part-time student in University of Chicago's evening MBA program. Eric recently finished the MP2Kmag Guide What's New in MapPoint 2004.



Google
 
MP2Kmag Internet


 Recent Discussion
-Virtual Earth Case Study: Regional Government Alliance Builds Connections with Integrated Mapping
-Virtual Earth on CSI: New York
-Helping out after the China quakes
-Coastal Boundaries
-Mapping Earthquakes in China
-An invalid argument was encountered.
-Navman Wireless Oem Solutions Enhances Leading Line Of Gps Receiver Modules
-T-mobile UK
-Virtual Earth and OpenLayers
-Reminder: Microsoft Virtual Earth Partner Webinar and Offer for Free Training
-Virtual Earth Quarterly Technical Briefing
-Customize User Page
-Information about area
-Territory information
-Gps task pane in ActiveX
-Worldwide Telescope Now Available!
-c++ - setting the color of a line
-Initial Costa Rica MapServer map is up & running!
-Satellite Images of Myanmar Cyclone Damage
-Virtual Earth Loyalist: Aerial View
-Leaving messages on the Virtual Earth for Government blog site
-Virtual Earth Webcast: Adding Mapping Capabilities to your Applications with Virtual Earth
-Get new Lat & Lon from speed
-Integrating Virtual Earth Maps and Excel 2007
-Zillow.com
 Resources
Browse GIS books and periodicals
Best Car Contract Hire Lease Save
Find a MapPoint Partner or Consultant
Real Estate Columbia, MO Real Estate


Want Your Site To Appear Here?

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

• Replacement Cordless Phone Batteries from DSMiller
Improve your career with a computer degree LocalEDU.com
• Tim Cohn's Marketing Strategy Consultancy
• Buy Toner, Ink Cartridges & Drums at Marquee Office Solutions
• Looking for Dry Erase Boards? See Dry Erase Boards
• 5339 - We Know Bikes: Road Bikes / Triathlon Bikes / Mountain Bikes / BMX Bikes
• Buy Your Car Used Cars, Car Lease and Contract Hire