Professional Documents
Culture Documents
16
Chapter
MapX Customer Installation Installing the MapX OCX Installing Support for Spatial Server Access Installing Raster Format Handlers Installing Maps and Geosets Adding Keys to the Windows Registry Passing in the MapX license String Redistributing Your MapX Application With MrSID
216
MapX Customer Installation // IMPORTANT NOTE: If using the Software Copy Protected (SCP) version of the MapX OCX Installer, use the following line instead. // LaunchAppAndWait(MapXOcxPath^"setup.exe","MAPXSCP",WAIT) // Passing the argument "MAPXSCP" with force the SCP version of the OCX to get installed. // Done setting up, remove sessage SdShowMsg (@MSG_OCX_MESSAGE, FALSE); endif;
CommandProcessorRes.dll COMPILER.DLL CoordSysRes.dll DAEngineRes.dll DBLAYER.DLL ExprPacketCreator.dll FcnInfoServer.dll GeoObject.dll GeosetManager40.exe LEGEND.DLL LEXERRES.DLL MAPINFOW.PRJ MAPX.ABB MIDLG40.DLL MIRDBRES.DLL PROGRAM.DLL RasterRes.dll STYLES.DLL Thematics.dll CustomProperties.dll DBINFO.DLL DBLayerRes.dll ExprPacketCreatorRes.dll FcnInfoServerres.dll GeoObjectRes.dll GeosetManagerIntl40.dll LegendRes.dll MapBasicInternalFcn.dll MAPPER.DLL MAPX.PEN MIDLIN40.DLL mirdbspatial.dll ProgramRes.dll REGSVR32.EXE TextFileReader.dll TOKENS.DLL
217
GeoDictionaryManager40.e GeoDictionaryManagerIntl40.dll MIGEOREG.DLL xe Mapinfow.fnt ThematicsRes.dll ALASKA.LAS CONUS.LOS PRVI.LAS STGEORGE.LOS STPAUL.LAS CUSTSYMB\ CUSTSYMB\BADG232.BMP CUSTSYMB\BOOK132.BMP CUSTSYMB\CAUT132.BMP CUSTSYMB\FARM132.BMP CUSTSYMB\GLOB132.BMP CUSTSYMB\HOUS132.BMP CUSTSYMB\HYDR132.BMP CUSTSYMB\LITE232.BMP CUSTSYMB\MBOX232.BMP CUSTSYMB\ONEW232.BMP Mxintl40.dll RegisterDS4.exe ALASKA.LOS HAWAII.LAS PRVI.LOS STLRNC.LAS STPAUL.LOS CUSTSYMB\YIEL2-32.BMP CUSTSYMB\BANK1-32.BMP CUSTSYMB\CAMP1-32.BMP CUSTSYMB\CHUR1-32.BMP CUSTSYMB\FAST1-32.BMP CUSTSYMB\GOLF1-32.BMP CUSTSYMB\HOUS2-32.BMP CUSTSYMB\INTE1-32.BMP CUSTSYMB\MAIL1-32.BMP CUSTSYMB\MOSQ1-32.BMP CUSTSYMB\PENC1-32.BMP Tools.dll GEORES.DLL CONUS.LAS HAWAII.LOS STGEORGE.LAS STLRNC.LOS MAPX40.OCX CUSTSYMB\BADG132.BMP CUSTSYMB\BANK232.BMP CUSTSYMB\CAR132.BMP CUSTSYMB\COMP132.BMP CUSTSYMB\FIRE132.BMP CUSTSYMB\HOSP132.BMP CUSTSYMB\HOUS332.BMP CUSTSYMB\LITE132.BMP CUSTSYMB\MBOX132.BMP CUSTSYMB\ONEW132.BMP CUSTSYMB\PIN1-32.BMP CUSTSYMB\PIN4-32.BMP CUSTSYMB\POLI132.BMP
218
MapX Customer Installation CUSTSYMB\RAIL132.BMP CUSTSYMB\REST132.BMP CUSTSYMB\SYNA132.BMP CUSTSYMB\TEMP132.BMP CUSTSYMB\TRAF132.BMP CUSTSYMB\YIEL132.BMP CUSTSYMB\RAIL2-32.BMP CUSTSYMB\STAT1-32.BMP CUSTSYMB\TARG1-32.BMP CUSTSYMB\TOWE1-32.BMP CUSTSYMB\TRUC1-32.BMP CUSTSYMB\AMBU1-32.BMP CUSTSYMB\RAIL332.BMP CUSTSYMB\STOP132.BMP CUSTSYMB\TAXI132.BMP CUSTSYMB\TOWE232.BMP CUSTSYMB\TRUC232.BMP
Ideally you will incorporate the installation of MapX into your installation procedure, so that your end user wont need to perform a separate installation to install MapX. There are four main steps to installing and distributing MapX applications: 1. Install the necessary files onto your user's computer. 2. Run utilities (such as regsvr32.exe) to register specific files on the user's system. 3. Add specific keys to the Windows registry 4. Pass in the MapX license string at application runtime.
Note: If you are using MapX in a dialog with Visual C++, VisualBasic, Delphi, or
PowerBuilder they will take care of creating MapX with the correct license string and therefore you can skip this section. If you are creating the MapX control using the CMapX::Create() method in Visual C++ you do need to take this extra step. The files that are installed with MapX can be divided into the following categories: Required files: MapX OCX and its dependent DLLs Windows system files: including fonts, MFC, and OLE dlls
219
Chapter 16: Distributing Your MapX Application Optional files: Dataset drivers (used for databinding) Import/Export raster handlers Maps and Geosets
The Installshield sample provided on the MapX Installation CD only illustrates how to install the required files. This chapter will cover installation requirements for the required files and the optional files.
example, MapX uses MFC and OLE dlls that reside in the Windows System directory. We also recommend that the MapX common directory should be: \Program Files\Common Files\MapInfo Sharred\MapXCommon. The following table describes what files need to be installed and where they should be installed to. Where to Install Files \Windows\System Other Special Requirements Do a version check before replacing these files. If older version, during replace files may be in use and require a reboot if that is the case.
220
Other Special Requirements Must be registered using regsvr32.exe Must be registered using regsvr32.exe. Prior to registering the OCX, make sure the MapX dependent files are installed. Must be registered using regsvr32.exe Must be registered using regtyplib.exe
MMapXColumnInfo.dll mdatasetint.tlb
221
Files
MapX common MapX dependent files: directory ALLTYPE.DLL, AllTypeRes.dll, ColLookupSystem.dll, CommandProcessor.dll, CommandProcessorRes.dll, COMPILER.DLL, COORDSYS.DLL, CoordSysRes.dll, CustomProperties.dll, DAENGINE.DLL, DAEngineRes.dll, DBINFO.DLL, DBInfoRes.dll, DBLAYER.DLL, DBLayerRes.dll, ExprPacket.dll, ExprPacketCreator.dll, ExprPacketCreatorRes.dll, ExprPacketRes.dll, FcnInfoServer.dll, FcnInfoServerres.dll, FIND.DLL, FINDRES.DLL, GEO.DLL, GeoDictionaryManager40.exe, GeoDictionaryManagerIntl40.dll, GeoObject.dll, GeoObjectRes.dll, GEOSET.DLL, GeosetManager40.exe, GeosetManagerIntl40.dll, GeosetRes.dll, LEGEND.DLL, LegendRes.dll, LEXER.DLL, LEXERRES.DLL, MapBasicInternalFcn.dll, MapBasicInternalFcnres.dll, Mapinfow.fnt, MAPINFOW.PRJ, MAPPER.DLL, MapperRes.dll, MAPX.ABB, MAPX.PEN, METADATA.DLL, MIDLG40.DLL, MIDLIN40.DLL, MIRDBRES.DLL, Mxintl40.dll, PROGRAM.DLL, ProgramRes.dll, RASTER.DLL, RasterRes.dll, REGSVR32.EXE, RegTypLib.exe, STYLES.DLL, TextFileReader.dll, TextFileReaderRes.dll, Thematics.dll, TOKENS.DLL, Tools.dll, UTILITY.DLL, UtilityRes.dll, ThematicsRes.dll, GeoRes.dll
222
Files MapX font files; ARIAL.TTF, MAPIS___.TTF, MAPSYM.TTF, TTMIAR__.TTF, TTMICG__.TTF, TTMIMI__.TTF, TTMIOG__.TTF, TTMIOS__.TTF, TTMIRE__.TTF, TTMITC__.TTF, TTMIWE__.TTF Nadcon support files: ALASKA.LAS, ALASKA.LOS, CONUS.LAS, CONUS.LOS, HAWAII.LAS, HAWAII.LOS, PRVI.LAS, PRVI.LOS, STGEORGE.LAS, STGEORGE.LOS, STLRNC.LAS, STLRNC.LOS, STPAUL.LAS, STPAUL.LOS
Other Special Requirements These fonts have to be installed and registered with the operating system. Please see below for moreinformation.
Only required if using layers with the NAD 27 and NAD 83 coordinate systems.
223
Files Bitmap symbols: TOWE1-32.BMP, POLI1-32.BMP, MBOX2-32.BMP, GOLF1-32.BMP, TOWE2-32.BMP, RAIL1-32.BMP, MOSQ1-32.BMP, HOSP1-32.BMP, IEL2-32.BMP, RAIL2-32.BMP, ONEW1-32.BMP, HOUS1-32.BMP, ADG1-32.BMP, ONEW2-32.BMP, HOUS2-32.BMP, ADG2-32.BMP, HOUS3-32.BMP, ANK1-32.BMP, ANK2-32.BMP, OOK1-32.BMP, AMP1-32.BMP, TRAF1-32.BMP, AR132.BMP, TRUC1-32.BMP, RAIL332.BMP, AUT1-32.BMP, TRUC232.BMP, REST1-32.BMP, PENC132.BMP, HUR1-32.BMP, YIEL132.BMP, STAT1-32.BMP, PIN132.BMP, HYDR1-32.BMP, AMBU132.BMP, STOP1-32.BMP,PIN232.BMP, INTE1-32.BMP, COMP132.BMP, SYNA1-32.BMP, PIN332.BMP, LITE1-32.BMP, FARM132.BMP, TARG1-32.BMP, PIN432.BMP, LITE2-32.BMP, FAST132.BMP, TAXI1-32.BMP, PIN532.BMP, MAIL1-32.BMP, FIRE132.BMP, TEMP1-32.BMP, PIN632.BMP, MBOX1-32.BMP, GLOB132.BMP, MapX SDK CD.
Only required if using Underneath the custom bitmap symbols. MapX common directory, in a directory called Custsymb. For example: \Program Files\Common Files\MapInfo Shared\MapX Common\Custsymb
The sample Installshield program installs the above files. The sample can be found on the
MapX also uses some TrueType fonts. These font files (*.ttf) must be copied to Windows Font Folder. Fonts must also be registered with Windows. If you are using a third-party software package to create your installer, that package might handle font registration for you. Otherwise, you can register fonts manually, by calling the Win32 AddFontResource routine. Once a font is properly registered, the registry contains a corresponding key under: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts
224
If your application uses the ODBC data driver, you must register MODBCDataset.dll and MMapXColumnInfo.dll. If your application uses the Notes data driver, you must register MNotesDataset.dll and MMapXColumnInfo.dll. If your application uses either the ODBC or the Notes data driver, you must register the type library as follows: regtyplib <filespec of mdatasetint.tlb> MapX allows you to bind data to a map layer. Please see, "Putting Your Data on the Map" for additional information.
Note: All of these dataset drivers should be installed in the same directory as the MapX
OCX, which is usually found in the MapX common directory: \Program Files\Common Files\MapInfo Shared\MapX Common
225
Chapter 16: Distributing Your MapX Application This table illustrates the various options for data binding and what the installation requirements are. All of the files below must be registered with ressup32.exe. Dataset source type Lotus Notes Dataset drivers Mnotesdataset.dll Installation requirements Notes dataset driver requires nnotes.dll to be locateable through the system path. Odbc32.dll must exist in system path Delphimm.dll must exist in system path Borlndmm.dll must exist in system path
MapXADODS.dll, ATL.dll ADO must be installed. MapXRDODS.dll, ATL.dll RDO must be instaled.
226
Installing Raster Format Handlers The LEADTOOLS Win32 Pro provided by LEAD Technologies, Inc and HALO Imaging libraries provided by Media Cybernetics are included with MapX. You may use either of these to display most raster files in MapX. LeadTools will load the entire raster image into memory at the time the image is referenced in MapX. This will mean that the image will take longer to load, but panning and zooming will be faster. HALO will only load what it needs to display into memory, so it will load the image faster, but panning and zooming will be slower. By default, HALO will be attempted first. You may change this order by either not including the HALO libraries when distributing your application, or by renaming the LeadTools handler from a .rhx to a .rhu or anything else not used before the letter x. There may also be some formats which are not supported by either library and therefore will have their own separate library.
Note: All of these raster handlers should be installed in the same directory as the MapX
OCX, which is usually found in the MapX common directory: \Program Files\Common Files\MapInfo Shared\MapX Common. Here is a list of handlers included with MapX: Format Handler All raster types Lead Tools Required files Migeoreg.dll, MIRASTER.DLL LTFIL70N.DLL, LTKRN70N.DLL, leadtool.rhx JPG-LFCMP70N.DLL, GIF-LFGIF70N.DLL, TIF-LFTIF70N.DLL, LFFAX70N.DLL PNG- LFPNG70N.DLL, PSD- LFPSD70N.DLL, WMF-LFWMF70N.DLL, BMP-LFBMP70N.DLL BMP-miffbmp.dll, GIF-miffgif.dll, JPG-miffjpeg.dll, PCX-miffpcx.dll, TARGA-mifftga.dll, TIF-mifftiff.dll Or you may use the TIF library provided by Lead Tools or Halo. Supported raster types and DLLs needed
Halo Libraries
Halo.rhv, mihiffl.dll
TIF
TIFF.RHL
SPOT MRSID
227
Chapter 16: Distributing Your MapX Application Supported raster types and DLLs needed
MIG-GRIDDLL.DLL
228
Passing in the MapX License String when you install MapX on your system. Therefore, if you want to see what these registry keys should look like, view your system's registry using a utility such as regedit.exe. Key HKEY_LOCAL_MACHINE\Software\_ MapInfo\MapX 4.0\GeoDictionary Description String - The GeoDictionary key has the file specification for the geodictionary file. Example: C:\Program Files\myappdir\Maps\GeoDict.DCT String - The SearchPaths key has semicolon-delimited file specifications of where map files and geosets may exist; it defaults to an empty string ("") other than in the directory specified in the GeoDictionary key. String - Has the location of the folder where the OCX and support files are Located. Example: \Program Files\Common Files\MapInfo Shared\MapX Common
Note: The GeoDictionary path is used when adding a geoset to the MapX object
without specifying the full path of the Geoset and when using autobinding. In addition, the SearchPaths key is not necessary if not using the GeoDictionary. See Installing Maps and Geosets to determine whether or not these keys are necessary for your application.
PowerBuilder they will take care of creating MapX with the correct license string and therefore you can skip this section. If you are creating the MapX control using the CMapX::Create() method in Visual C++ you do need to take this extra step.
Visual C++
Again, if using MapX in a dialog in Visual C++, you do not need to perform this step.
229
Chapter 16: Distributing Your MapX Application In order to successfully create the MapX object, you must pass the license string as the bstrLicKey parameter to CMapx::Create().
230