MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




pushpins with delphi

This is a discussion on pushpins with delphi within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm very new to mappoint so please forgive me if this has been answered before. i want to display the ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-18-2003
ian ian is offline
Junior Member
White Belt
 
Join Date: Jun 2003
Posts: 2
pushpins with delphi

I'm very new to mappoint so please forgive me if this has been answered before. i want to display the results of a databse query on a map. the language is delphi. here is my code.

var vGuid : TGuid;
curLat, CurLong, CurScore:real;
objLocTst:location;
ObjPin:Pushpin;
i:integer;
begin
i:=0;
OleContainer.CreateObject('MapPoint.Map.NA.9', False);
OleContainer.DoVerb(1);
OleContainer.OleObjectInterface.GetUserClassID(vGu id);
FMap := IDispatch(OleContainer.OleObject) as _Map;
FMap.DataSets.AddPushpinSet('70 plus');

with DM.ADOQ do
begin
First;
// while not Eof do
for i:=0 to 100 do //just do a subset for debugging
begin
CurLong := DM.ADOQ.FieldByName('longitude_x').AsFloat; //longitude
CurLat := DM.ADOQ.FieldByName('latitude_y').AsFloat;//latitude
CurScore := DM.ADOQ.FieldByName('homogeneity_score').Value; //what needs to be plotted as a function of lat, long
objLocTst := FMap.GetLocation(curLat, CurLong,1) ;
objPin := FMap.AddPushpin(objLocTst, floattostr(CurScore));
objPin.BalloonState := geoDisplayNone ;
objPin.Cut ;

Next;

end;
end;

// FMap.
end;


this runs fine but i never get anything displayed. i think i'm missing something fundamental. can anyone help? thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 06-19-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Seems you´re deleting your pushpins with ObjPin.Cut

Greetings, Jack.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 06-19-2003
ian ian is offline
Junior Member
White Belt
 
Join Date: Jun 2003
Posts: 2
yes, i caught that later on. thank you. how would i go about adding a second dataset to this? i want to be able to overlay pushpins of different colours, each one corresponding to the results of a different database query. i think i'm missing the link between a dataset and a pushpin..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Delphi class terrastudios MapPoint 2006/2009 Discussion 9 12-02-2005 04:01 AM
example in Delphi to route tontaegu MapPoint 2006/2009 Discussion 0 08-23-2005 02:42 AM
Creating a subset of Pushpins from a set of pushpins paf33 MapPoint 2006/2009 Discussion 3 08-09-2005 04:54 AM
Delphi Anonymous MapPoint 2006/2009 Discussion 2 12-18-2003 11:11 AM
'AddCommand' + Delphi stuarth MapPoint 2006/2009 Discussion 0 04-09-2003 09:18 AM


All times are GMT -5. The time now is 09:06 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Orlando Flights
Holidays in Orlando are fantastic for families. There are a massive range of spectacular theme parks. Let Holiday Hypermarket book you great value Orlando flights and hotels.

Flights to Italy
Find and book flights to Italy. Travel Counsellors can help with travel to Italy including flights and accommodation.

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 to Cancun
The Holiday Place has special offers on holidays to Cancun during the month of September. Book a late summer holiday with us!

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.

Comparison Holidays
Travel.co.uk is a travel comparison service which makes it easy for you to find and plan the best holidays.

Cheap Holidays in Goa
Visit the unique blend of east and west in India! Get information on cheap holidays in Goa, only at On The Beach.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51