MapPro71.OCX SDK  -  FAQ

Home Company Info

 

UnderTow News
Products
Services
Purchase
Downloads
Tech Support

 


 

MapPro71.OCX SDK
Frequently Asked Questions and answers

 


General Questions
Do you need to be a programmer to use the SDK?

Does the SDK come with Data? If so, does it cover the entire US and at what detail?

How hard is it or how long does it take to create an application with the SDK?
Can I insert/display my own points on the map?
Can it Geocode?

Is there built-in GPS support?

Is it Royalty free?
Can it import other map data? Can I change a street if I need to?

Technical Questions

Every time I try to execute my project, I get a green screen and the error message that the product is unregistered for development.

I can see the MAP of the USA, but when I zoom in, there are no streets.

Can I use the TIGER and the Tele Atlas data at the same time?

What method can I use for Reverse Geocoding?

Which is better to use, SetItemBitmap, or SetItemLocalBitmap?

I’m drawing a line using the DrawLine function, but it’s not showing up.

 Can I use multiple controls on my form/project?

 



Answers

Do you need to be a programmer to use the SDK?

 

Yes.  Depending on the application you intend to use the SDK for, you can be an intermediate programmer (simple app), or you may need to be a fairly advanced programmer - to use some of the more involved capabilities of the map control.  You also need to own, and be familiar with, a mainstream development environment (like VB, Delphi, Visual C++, C#, .NET, etc.)

 


Does the SDK come with Data? If so, does it cover the entire US and at what detail?

 

Yes, the SDK can be licensed with a TIGER/Line based data set, or a Premium Data set based on the Tele Atlas Dynamap data.  The TIGER/Line data cover the entire USA and the Premium Tele Atlas dataset covers the entire USA and Canada. As the name (and licensing costs) indicate, in addition to also including Canada, the Tele Atlas dataset is of much higher quality, provides much more detail and coverage, etc.

 


How hard is it or how long does it take to create an application with the SDK?

 

That depends on the complexity of the application you are interested in developing.  In its minimal form, you can actually create a simple mapping application with just two lines of code in the FormCreate (or equivalent) event of your integrated developement environment.  One to open up the configuration dialog, so that you can point to the appropriate data files, and one more to make the built-in toolbar appear.  In visual development environments, you actually do not need ANY lines of code, since you can set these parameters in the Property Inspector, and simply run the application. On the other hand, a complex application can be tens of thousands on line of code, and fairly involved. 

 

As to how long... It could take 10 minutes or 10+ months depending on the complexity of the application, the expertise level and experience of the development team, etc.

 


Can I insert/display my own points on the map?

 

Yes.  You can insert points, with optional associated markers (bitmaps), and/or text, anywhere on the map, by simply identifying the point’s Longitude and Latitude.  You can also select to use one of the built-in bitmaps to identify each point, or use ones that you have created. In addition to just marking points, the OCX contains a complete CAD user layer that allows you to create and manipulate a variety of vector-based objects.

 


Can it Geocode?

 

Yes, the control has built-in geocoding capabilities.  Simply pass the address as a string and the control will return the Longitude and Latitude for that address.

 


Is there built-in GPS support?

 

No, there is no native GPS support, although the control has built in user object management capabilities, which can be used to dynamically manage a moving map display, if the developer passes Lon,Lat coordinates to the OCX.  Built-in GPS support is being considered for the next generation of the map control.

 


Is it Royalty free?

 

No.  If you distribute copies of your application to others, or use it to track mobile assets, or create map images on a server to be accessed by others, or distribute printed copies of maps, you need the purchase the appropriate end-user license(s).  Take a look at the user's manual section on "Deployment"

 


Can it import other map data? Can I change a street if I need to?

 

Yes, the map control has the ability to import multiple MIF/MIF or SHP files, and the developer/user can specify the rendering attributes for each layer and type of object. However, these are imported user layers that simply render on top of the map, they are NOT integrated with the data set provided as part of the SDK. The map control also gives you the ability to define new street segments (and attributes like road type, name, etc.) which may be automatically loaded, and used in conjunction with the core data sets. 

 


Every time I try to execute my project, I get a green screen and the error message that the product is unregistered for development.

 

If you have a purchased developer’s license, you have received a Vendor Code and Vendor Password.  You need to use those two pieces of information to register your copy of the control as a developer’s copy.  In most visual development environments, this can be accomplished by right-clicking on the control, selecting Properties and then the Installation tab.  In other environments, this may be done directly in the properties inspector, or by setting the VendCode and VendPass properties in one of the form initialization events.

 


I can see the MAP of the USA, but when I zoom in, there are no local streets.

 

These are the most likely culprits...

  1. The data paths are pointing to the correct data valid folders at the time of the failure?  Even though you may have set the paths either at design time, or as part of a FormInitialize, FormCreate, or FormLoad event, it’s possible that in your IDE event sequence, a setting of Autoload=True is causing a configuration (.CFG) file to be loaded after your paths were initially set, and reset to them to the values in the CFG file.  The best way to confirm that the paths are set correctly would be to have a means to echo the path property values at the time that you observe the failure.

  2. If the folders are correct, do they contain valid data files?  The detailed street-level data is stored in the files provided in the "States" folder of the distribution DVD, and they have the extension ZPG.  The SDK version # is also important.  MapPro71.OCX, Rel.2 can use data files from either Rel.1 or Rel.2, but the MapPro71.OCX, Rel.1 map control CANNOT use Rel.2 data files.

  3. Are the appropriate signature files present in the folder that contains the .ZPG files?  The user's manuals, "Deployment" appendix explains in detail what signature files should be there, depending on your application.

  4. Does the .DataSource property correspond to the data files the above paths are pointing to?  For example, if your DataSource=2, but the data folders you are pointing to contain TIGER/Line data files, then the detailed roads files will not be loaded.

  5. Is it possible that you have reset the visibility of the street level data?  You might have set such visibility to a value lower than the 2-mile default, through the appropriate SetOption call, in which case roads will not become visible until your zoom scale is lower that the SetOption value.


Can I use the TIGER and the Tele Atlas data at the same time?

 

No, unfortunately this is an either/or situation.  You can toggle between the two using your data source property, but can't have both of them being used at the same time.

 

There are two pieces of information that determine what data will be used to render the maps.  One is the DataSource property, and the other is the actual data files that your data paths are pointing to.  To switch between the two data sets, you need to

  1. Set DataSource=1 (or ZP5_TIGER, if the enumerated values are accessible in your IDE) to use the TIGER data set,  or DataSource=2 to use the USA Tele Atlas dataset, or DataSource=4 to use the Canadian Tele Atlas data set and DataSource=6 to use the USA & Canadian Tele Atlas data set.

  2. Set your data paths to point to the folder where the corresponding data files are located, and

  3. Make sure that the appropriate signature (.SIG) files are present in the States data folder.


What method can I use for Reverse Geocoding?

 

Use the FindClosest method.  Just be judicious with the specification of the search radius, if you do not want your searches to consume much of your CPU time and computer resources, since all local data within the specified radius has to be loaded and searched.  Depending on the region of the US, a setting of .1 miles may be desirable, to start with.

 


Which is better to use, SetItemBitmap, or SetItemLocalBitmap?

 

Well, that depends on your application.  Using SetItemBitmap makes use of a handle to the loaded bitmap, which means it can be used for many different items without using any additional resources to store a new bitmap definition, but the user is responsible for managing those handles.  SetItemLocalBitmal, on the other hand does not require any handle management.  It should also be noted that the OCX takes a look at the list of Loaded LocalBitmap names, and if the specified bitmap is already loaded, no additional copies are loaded, to attempt and minimize resource usage.

 


I’m drawing a line using the DrawLine function, but it’s not showing up.

 

Users frequently forget that the device contexts provided by Windows are transient.  If a dc “X” is used for the canvas at the time the map is painted, there is no guarantee that the same dc # corresponds to that same canvas a few CPU cycles later (unless the canvas is locked by the user).  A simple way to ensure that the line is drawn on dc that corresponds to the surface of the map, is to draw the line inside the PaintAfter event, using the dc passed in the event, which the one used to paint the map at that precise time.

 


 Can I use multiple controls on my form/project?

 

No, only one instance of the control is permitted on a form, in a given project.  Multiple instances would create problems since they would be sharing some of the data blocks.  If multiple map views are needed in a single application, at the same time, the user should use the DirectView method to paint additional maps on user-selected control surfaces.

 


 

Copyright © 2007 Undertow Software Corp.
 Home Up Next