1.5. How It All Fits Together
By now, you might be
Figure 1-9. MapPoint Platform development choices
|
1.6. Where Are We?
Microsoft MapPoint technologies provide a wide variety of applications, services, and tools to develop location-enabled applications and
If you are wondering how to digest so much information about all these products in one introductory chapter, don't worry; I will discuss MapPoint 2004, MapPoint Web Service, and MapPoint Location Server in detail in the upcoming chapters. Let's get started! |
Part I: MapPoint 2004
|
Chapter 2. Programming with MapPoint 2004MapPoint 2004 provides a rich set of APIs and an ActiveX Control that lets you build powerful location-based business applications. Originally, the MapPoint APIs and ActiveX Control were designed for use with COM technologies, but thanks to .NET interoperability with COM, you can use those COM APIs to build applications using .NET programming languages such as C# and VB.NET.
This chapter explores using the MapPoint 2004 APIs and MapPoint 2004 ActiveX Control to accomplish basic location-oriented tasks, such as finding places, addresses, and points of interest, routing between places, and other lightweight business-oriented
|
2.1. The MapPoint 2004 Object Model
The MapPoint 2004 APIs and MapPoint 2004 ActiveX Control are designed for building disconnected Windows applications. Since all map data is installed locally on your hard drive, you can build Windows applications that don't need any network connectivity. However, if you need to build a connected web-based mapping application to keep your application footprint to a minimum
You can develop three kinds of applications using MapPoint 2004:
Location data-processing applications are typically used in the business intelligence part of an enterprise application. For example, a goods-delivery company must optimize the stops in a delivery route to save on fuel costs and drivers' time. These applications are developed using the MapPoint 2004 APIs . The visual application category applies when you want to display a map to represent business data thematically. For example, a map displaying sales across the country based on zip code gives an immediate understanding of whether location plays a crucial role in sales. For applications that embed maps, it is ideal to use the MapPoint 2004 ActiveX Control; however, you can also use MapPoint APIs to display maps without using the ActiveX Control, as discussed in Chapter 3. MapPoint 2004 Add-Ins extend MapPoint functionality to include your specific business needs. For example, you might want to use MapPoint 2004 application as a mapping tool in your enterprise but need an additional feature to display sales data that is available as an internal web service. In this case, MapPoint 2004 Add-Ins are ideal for adding features to the MapPoint 2004 application. There are also some specific scenarios where you need to implement your application logic as an Add-In for performance reasons, which we will discuss in Chapter 4.
Whether you are developing with the APIs or with the ActiveX Control, the
Figure 2-1 shows the relation of these classes, while Table 2-1 gives you a selective list of the
Figure 2-1. MapPoint 2004 Object Modelkey objects
Table 2-1. Important methods available on the Map Class
{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %} The Map class exposes a set of methods that does basic methods to find, mark (by adding pushpins), and convert screen coordinates to loctation objects and vice versa. Apart from the Map object, the other two important and most frequently used objects are the FindResults and Location objects. The FindResults object represents a collection of Location and/or Pushpin objects. You can access the individual collection items using the FindResults.get_Item method (discussed in more detail later in this chapter). The Location object, on the other hand, represents a real location in MapPoint 2004. The Location object exposes methods such as FindNearby to find nearby points of interest and DistanceTo to find the distance between two points (locations). |