PDA

View Full Version : How do you open a mapoint map in delphi?



Anonymous
11-30-2002, 07:30 AM
I have successfully got Mappoint into my delphi application by the use of a olecontainer, what I would like to do is open a mappoint map from disk. Is this possible?

Eric Frost
11-30-2002, 09:57 AM
When you say open a map from disk, do you mean you would have a static map image (jpg, gif. bmp) file?

Anonymous
12-01-2002, 06:32 AM
I have opened a map in Mappoint and added some shapes etc and have saved this as a .PMT file.

I now want to open this map in my delphi application so that the delphi application can plot pushpins etc.

Cheers

Mike

Eric Frost
12-01-2002, 09:23 AM
I don't know much about Delphi, but see this method in the Help File:

OpenMap method (Application)
Opens an existing map. Displays the Save dialog box if another map is currently active and has not been saved. This method is not available when MapPoint is embedded.

Anonymous
12-01-2002, 04:34 PM
My Map is embedded in my delphi form so I do not think I can do it that way?

Mike

yelmaci
12-04-2002, 07:07 PM
you can do it.

first, you must install the mappoint activex to delphi's component palet. you can use import type library of the project menu.

then you have to select map object of mappoint from this component palet.

in the formcreate method of the form, :

map1.application.visible:=true;

thus, there will be opened mappoint application.


you can play with this opened applciation. for instance :


map1.addpushpin(loc1,'blah blah');

or

map1.zoomin;


enjoy.