Jack Melgers explains how developers can go about using MapPoint within Delphi and provides several code snippets
Read the full article: http://www.mp2kmag.com/articles.asp?ArticleID=65
This is a discussion on Using MapPoint In Delphi within the MP2K Magazine Articles forums, part of the Map Forums category; Jack Melgers explains how developers can go about using MapPoint within Delphi and provides several code snippets Read the full ...
Jack Melgers explains how developers can go about using MapPoint within Delphi and provides several code snippets
Read the full article: http://www.mp2kmag.com/articles.asp?ArticleID=65
Please can someone tell me why I get "...EAccessViolation with message 'Access violation at address 00000000. Read of address 00000000'..." whenever I run this code? (It always happens on the distanceto line.
Code:Application.CreateForm(TFMapPoint, FMapPoint); FMapPoint.OC1.CreateObject('MapPoint.Map.EU.9', False); FMapPoint.OC1.DoVerb(1); FMapPoint.OC1.OleObjectInterface.GetUserClassID(vGuid); Map := IDispatch(FMapPoint.OC1.OleObject) as _Map; mpResults1 := Map.FindResults('WR9 8UH'); oleCount1 := mpResults1.Count; if (oleCount1 < 1) then begin ShowMessage('No results (1)'); Exit; end; oleResult1 := 1; ID1 := mpResults1.Item[oleResult1]; Loc1 := Location(ID1); mpResults2 := Map.FindResults('SN8 2QE'); oleCount2 := mpResults2.Count; if (oleCount2 < 1) then begin ShowMessage('No results (2)'); Exit; end; oleResult2 := 1; ID2 := mpResults2.Item[oleResult2]; Loc2 := Location(ID2); Dist := Loc1.DistanceTo(Loc2); //ShowMessage(FloatToStr(Dist)); FMapPoint.Release; FMapPoint := nil;
Hi
I cannot get either code example to work with Delphi 6.
The first method runs MapPoint but the window is invisible.
The second method takes 30 seconds to respond to the Zoom() call and uses 150Mb of memory whilst doing so.
Can anyone suggest why these methods don't work for me?
Thanks
Jim
Jim Burns
Delivearn Limited
Scotland
I'm having the same problem. MapPoint is invisible when I initialize it and add some pushpins. But when I close the application mapPoint becomes visible and asks whether I want to save the changes or not.Originally Posted by jimburns
Any hints how tro solve the problem?
I solved the problem with invisible form. It seems when you assign mp Application.ActiveMap to mpMap it doesn't keep Application's Visible property's value. I replaced the code in the article
intoCode:mpApplication.Visible := TRUE; mpMap:= mpApplication.ActiveMap; mpMap.GoToLatLong(43, -3, 100);
and now MapPoint is visible whenever I run the application.Code:mpMap:= mpApplication.ActiveMap; mpMap.Application.Visible := TRUE; mpMap.GoToLatLong(43, -3, 100);
hi,
just got MapPoint 2002 and am trying to use the ActiveX control in Delphi,
but everytime I try to place it on my form I get the error "No such
interface supported". Then, there are only 2 component in "Active X" and Map Point Application isn't there.
best regards
You need to import MapPoint ActiveX control before using it.
Check this article for instructions how to do that - http://mp2kmag.com/articles.asp?Arti...dress.verifier
You must run the latest version of the runtime librabry.
Thanks for this fabulous info on connecting MapPoint to Delphi!
Is it possible to connect the OleClassName/OleContainer to MapPoint installed on a serverlocation instead of local machine?
Adding a path to mpOleContainer.CreateObject('MapPoint.Map.EU.11',F ALSE) will probably not do the job? Can I manipulate my registery somehow? Does anybody know how to do this?
There are currently 1 users browsing this thread. (0 members and 1 guests)