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 2009
Press Releases
MapPoint Forums
Companies
Link to MP2Kmag
Wish List
MapPoint Trial
Authors
 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)

Small Business It...
Get the best IT solution for your small business. Call the Connect company.

cartridge
Get a cartridge online anytime. Simple, fast and secure. Check it out now… We supply top brands as well as our own guaranteed ink.

Jersey Flights
Holiday Hypermarket should be your first choice for cheap flights. Book flights to exotic destinations or even just to Jersey.

Holiday to Egypt
Book a holiday to Egypt with On The Beach and take advantage of our low price promise. Superb sightseeing and beautiful beaches.

Bulgaria property...
Bulgaria property is a very good investment and this company can give you all the info.

Holiday Goa
Thinking of a holiday to Goa? Want to visit the stunning white sandy beaches lined with palm trees? Don't want to burn a hole in your pocket? Then visit dealchecker.co.uk to check for great deals.

Majorca
Majorca is the largest of the Balearic islands offering white sandy beaches and warm blue seas. Enjoy a fun-packed vacation, ideal for old and young alike with the options of clubbing towns and quieter resorts.

  SPATIAL DATA IMPORTER CONTEST SUBMISSION: EXPORT SHAPES  

This code will export regions, lines, rectangles and pushpins/points to the MapInfo mif/mid file formats (other shape types are ignored). This allows people to use the drawing tools built into MapPoint to generate the shapes they will later want to import with the spatial importer, adding layers of regions and points to their MapPoint maps without owning a MapInfo product. One restriction should be noted: regions and lines are differentiated by whether or not the shape is filled. In MapPoint you can have a line that is filled, but I couldn't find a way to programatically differentiated between that and a region. It seems as if there should be a Shape property like "IsClosed" (True for a region, False for a line) which would allow you to tell a filled region from a filled line.

Included in the export are fields which could be used to more completely define the shape if they were recognized by the importer. For example, regions are exported with the line weight and fill color properties. (This leads to the obvious suggestion for another enhancement to the importer: that it use these shape properties.) Also, it appears as if the importer wants all of the shapes in an mif/mid file to be of one type (Is this a MapInfo restriction for how mif/mid files are created?). When I exported the shapes from a map with one region, one line, one rectangle and one pushpin and then tried to import it, only the first object was imported. When I exported a map with 10 regions, the importer recreated the regions perfectly.

To add the export functionality to your importer add-in:

  • Add MapInfoCreator.cls to the VB project. It contains code to export MapPoint Shape objects to MapInfo mif/mid files.
  • Replace the original modMapPointFunctions.bas with this new one, which has been modified to add Gilles Kohl's Arccos and CalcPos procedures.
  • Add a button named "cmdExportShapes" to form "frmSpatialDataImport".
  • Behind the button add the following code:

  • Also, add the following function to the form:


  • Author: Walt Cygan
    Email: wcygan@macrogroup.net
    URL: http://www.macrogroup.net
    Walt is a consultant for The MACRO GROUP, Inc. in Minneapolis, Minnesota. The MACRO GROUP, Inc. is an information systems consulting firm whose customers include public, private and non-profit organizations of all sizes.



    Google
     
    MP2Kmag Internet


     Recent Discussion
    -WorldWide Telescope Stars in Virtual Earth
    -blocking Ctrl+key
    -Will MapPoint Allow Me To....
    -OpenLayers 2.7 released
    -Color or pattern fills
    -MapPoint Webservice Performance Issues
    -MP2004 / Win98se
    -Willing to Pay for a Way to...
    -New custom toolbar in MapPoint
    -Newsletter Virtual Earth de Septembre 2008
    -Save a map (dialog box)
    -Making custom Territory defualt?
    -cut and paste push pins
    -U-Haul
    -Designing the Virtual Earth Web Services
    -Correct Addresses
    -Saving MapPoint Legends in .NET
    -Custom Territory Mappoint 2009
    -MP eats up Ram with multiple routes despite clearing.
    -Virtual Earth 6.2 and Web Service Webcast Recording
    -TIP: "Terminal Server has exceeded the maximum number of connections"
    -September 2008 Microsoft Virtual Earth Newsletter
    -Get Distance Function causes errors
    -Virtual Earth Event (Reading, UK): Use mapping for user experience to delight your customers!
    -Comparaison entre la 3D Google Earth et Virtual Earth
     Resources


    Want Your Site To Appear Here?

       © 1999-2008 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, Ink Cartridges & Drums 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, Car Lease and Contract Hire