Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Using MapPoint In Delphi Read the full article: http://www.mp2kmag.com/articles.asp?ArticleID=65 |
| |||
| Problems with Delphi
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;
|
| |||
| I'm having a problem with the code in the article
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 |
| |||
| Re: I'm having a problem with the code in the article Quote:
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 Code: mpApplication.Visible := TRUE; mpMap:= mpApplication.ActiveMap; mpMap.GoToLatLong(43, -3, 100); Code: mpMap:= mpApplication.ActiveMap; mpMap.Application.Visible := TRUE; mpMap.GoToLatLong(43, -3, 100); |
| |||
| problem with delphi 6
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 |
| |||
| mappoint installed on server
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? |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MapPoint 2004 and Delphi 5 | Anonymous | MapPoint 2006/2009 Discussion | 6 | 01-20-2005 06:34 AM |
| Mappoint addin with Delphi 6 | jeanluc | MapPoint 2006/2009 Discussion | 2 | 09-15-2003 02:03 PM |
| How to get mappoint Active X in Delphi? | jmiller55 | MapPoint 2006/2009 Discussion | 1 | 07-31-2003 09:54 PM |
| MapPoint.Application in Delphi | joesebi | MapPoint 2006/2009 Discussion | 1 | 07-11-2003 05:16 AM |
| Mappoint With Delphi 5 | stuarth | MapPoint 2006/2009 Discussion | 1 | 04-08-2003 10:21 AM |
Holidays Benidorm
Make your holidays in Benidorm to enjoy over 1000 bars, clubs and restaurants! The beaches are superb with great facilities and watersports. Book online...
Spain Holidays
Find great Spain Holidays with Travel Counsellors. A personal Travel Counsellor can help you plan the perfect holiday to Spain.
Thailand Holidays
Thailand Holidays can suit your budget when you book with dealchecker.co.uk. If you are strapped for cash, visit online to find the deal for you.
Holidays in Cyprus
Holidays in Cyprus are enriched by the abundance of churches, ruins and natural wonders. Book a holiday with us today!
Spain
Spain is such a diverse country that it has something to offer most holidaymakers. Finding delicious cuisine is no challenge and the shopping ranges from designer boutiques to unknown flea markets. Spain has much to offer.
Holiday Comparison
We can help you with holiday comparison when you check out the options at Travel.co.uk
Cheap Lanzarote Holidays
The Canary Islands beckons you to come! View information on cheap Lanzarote holidays at On The Beach!