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 2009
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 2009

Programming MapPoint in .NET

MapPoint Book

  Spatial Community
ViaVirtualEarth
SVG Tutorials
MapPoint

Map Visitors

 Direct Media

Travel Insurance Compare over 450 travel insurance policies (inc. annual multi-trip, single trip & winter sports)

  ARTICLES  


Using MapPoint in Foxpro

Charlie Parker shares a demo for using MapPoint within Foxpro that he originally prepared for a local Foxpro user group.

If you are a Visual FoxPro developer and want to learn how to use MapPoint in your applications, then here is a handy demo program on how to do that.

The demo program consists of a project, a main program and a form. The main program just kicks off the form. The form has all of the logic for handling MapPoint. The code in the form is commented so you can see fairly easily what it is doing.

Just a few notes on the operation: The "from" and "to" addresses are hard coded in the demo, but you can type in your own addresses or latitude/longitudes. If you enter a latitude/longitude, separate the values with a comma and be sure to check the box that says "Latitude, Longitude".

To have the program look up the location, click the "Compute Route" or the "Compute Distance" button. The times it took to find the locations, compute the route, compute the latitude/longitude, etc. are shown on the bottom of the form.

Remember, this is just a demo, so a minimum of error checking is done. For example, if you enter an invalid latitude or longitude, then you will get a MapPoint error since the program does not validate these before giving them to the MapPoint object. Also, there are a lot of things you can do with the MapPoint object that are not shown in this demo. However, this should get you started so you can try out some of the other features on your own.

Download it here: http://www.mp2kmag.com/downloads/foxprodemo.zip

NOTE: You must have both Visual FoxPro (any version) and MapPoint installed in order to run the demo program.

Discuss this story in the forum.

Author: Charlie Parker
Email: cparker(AT)fowlersoftware.com
URL: http://www.fowlersoftware.com
Charlie Parker has over 30 years of experience in designing, developing and supporting software applications. Since 1994, he has been a Project Manager for Fowler Software Design LLC, a custom software developer in Denver, Colorado. For more information on Charlie or on Fowler Software Design, see their web site at www.FowlerSoftware.com.



Google
 
MP2Kmag Internet


 Recent Discussion
-bingmaps: Join the UK #BingMaps team for the finance and insurance sector webcast tomorrow http://bit.ly/chMYcb
-Bing Maps at MIX10!
-Bing Maps at MIX10!
-bingmaps: Want live Twitter and Maps on your website, use the new widget from Bing Maps: http://bit.ly/9KkFSa
-linked files
-Criteria for extracting postcodes in Mappoint Euro Ver
-Spatial Data Import COM Add-in / Shapes (SHP file)
-BingMapsDev: @jont87 For Silverlight I would start here: http://is.gd/a4BAq and then look at the Bing Maps iSDK: http://is.gd/a4C4y
-bingmaps: Channel 5's Gadget Show are impressed by #BingMaps Birds Eye (forward to 24 mins) http://bit.ly/9Cn6sY
-bingmaps: #BingMaps SXSW Panel Announced http://bit.ly/9GWSeT
-bingmaps: Bing Maps retail and supply chain webcast starts in 10 minutes. Register here: http://bit.ly/dsNNJD
-Bing Maps SXSW Panel Announced
-Check if Mappoint exists on the PC
-bingmaps: @markti Great glad you like it!
-bingmaps: RT @ChrisPendleton: Bing Maps adds 6.7 MILLION sq. km. of new imagery: http://bit.ly/bCcyCw. @BingMaps #Russia #Sweden #Mexico #Australia
-bingmaps: #BingMaps UK team present Mapping Technology for the Communications sector http://cot.ag/979oFy
-bingmaps: Johannes Kebeck blogs on Daimler AG and the Smart Web Portal in the Cloud http://bit.ly/a8uvsR #BingMaps
-BingMapsDev: Have you joined the Bing Maps UK user group yet? http://bingmapsuk.ning.com/
-WiMax Clear Service in Chicago
-Registry Error Installing 2006 Version in Windows 7 Professional
-MapPoint Geocoding Project
-Water Feature toggle
-objGPS.Tracking = True give access denied
-Smart Web Portal in the Cloud
-The latest Bing Maps Imagery Update…
 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-2009 MP2K. Questions and comments to: website@mp2kmag.com
  Microsoft and MapPoint 2002/2004/2006/2009 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 Cartridges at Marquee Office Solutions
• Looking for Dry Erase Boards? See Dry Erase Boards • The Search Starts Here Used Cars
• 5339 - We Know Bikes: Road Bikes / Triathlon Bikes / Mountain Bikes / BMX Bikes
• Buy Your Car Used Cars UK, Car Lease and Contract Hire