Maptitude GISDK Help |
If you want to provide your own handling of the updating of OLE linked or embedded maps, you must write a custom GISDK application, which includes certain macros. Examples of these macros are included with documentation in the file srv_ole.rsc.
When the client program needs to update the image of an OLE linked map, the custom application runs the following macro:
Macro "OLE OPEN OBJECT MACRO" (filename, map_name)
In this macro, the custom application must open the specified map file in order to allow the client to receive an updated image of the map. The custom application can remain minimized during this process.
When the user of the client program double-clicks on an OLE embedded or linked map, the custom application runs this macro:
Macro "OLE EDIT OBJECT MACRO" (filename, map_name, embed_flag)
The argument embed_flag is 0 for a linked map, and 1 for an embedded map. Normally, double-clicking on an OLE object indicates that the user wishes to edit the object. In a client/server environment, however, you can use this double-click to update the object. The COM Object application can update the map simply by redrawing it, reflecting any changes in the underlying data, or can make more substantial changes to the map. If the OLE object is a linked map, update it by saving the new version of the map, using SaveMap(). If the OLE object is an embedded map, update it by calling CopyMapToOLE().
Using OLE embedded maps and CopyMapToOLE() is the slowest method of updating a map in your client program, because in addition to creating a new image of the map, Maptitude must also create and transfer the contents of a map file. This is only useful when it is important that the contents of the map file be stored in the client document.
For example, suppose you have a standard sales report in Microsoft Word that contains links to the latest sales data. Every week, you print out a new copy of the sales report, and the automatic OLE updating of embedded objects shows the latest data in tabular and chart form. You can include a link to a map, showing all your sales regions, color-coded by sales. Like your other OLE linked objects, this map is updated automatically, and does not require any COM Object programming.
Now, however, suppose you want another map showing the breakdown of sales in the region with the highest revenue for the week. You can write a simple Word macro that runs a custom application to update the map by zooming in on the sales region with the highest revenue. When the COM Object application saves the updated map, the OLE links in your sales report update to show the latest data.
For more information, see...
©2025 Caliper Corporation | www.caliper.com |