Hi,
(I visit actively this forum in this moment because I am on holiday and
as it is too hot outside I am improving my personal HomeDelivery system. Honestly, I find a lot of ideas here and I try as possible to share some of mine).
Quote:
|
Set objPin = objmap.FindPushpin(Name)
|
You have to be sure that "Name" is what you have indicated when you did
Set objPin = objmap.AddPushpin(ObjLoc, Name)
Quote:
|
Could you please advise how else I can improve this?
|
I did that i a different way:
I don't use DisplayDataMap.
I have my clients stored in a database with Id , Name, address,
number of ordered meals, Satisfaction, and so on ...
When I want to dispaly some or all of them on the map, I read my database, and, following some conditions, I give them different symbols.
Like this I can target my customers with suitable advertising.
Because these conditions are always changing, I gived the same symbol for everybody in the beginning.
When I want to display my clients in the map , I read my file and Add the pushpins I want :
Name = Client.Id
Set objPin = objmap.AddPushpin(ObjLoc, Name)
objPin.Symbol = nSymbol (

)
After, I can decide the conditions to be different,
For example:
Condition1 - Symbol1

if satisfaction is between 8 - 10
Condition2 - Symbol2

if satisfaction 6 - 7
Condition3 - Symbol3

if satisfaction 4 - 5
( Never I have satisfaction lower than 4 !!!!! )
To display these new symbols with the same pushpins, I change only the symbols.
Do while not Clients.eof ( Use your programming reading file syntax )
Searcher = Clients.Id
Condition = Clients.satisfaction
IF Condition1
Symbol = Symbol1
END IF
IF Condition2
Symbol = Symbol2
END IF
IF Condition3
Symbol = Symbol3
END IF
ChangeFoundPushPinSymbol(Searcher, Symbol, Condition)
Next
PROCEDURE ChangeFoundPushPinSymbol(SearcherPushPin, nNewSymbol, cNewNote="" )
objPin = ObjMap.FindPushpin(SearcherPushPin)
IF objPin <> Null ALORS
objPin.Select
objPin.Symbol = nNewSymbol
objPin.Note = cNewNote
END IF
Hope this helps
Regards
//************************************************** ***//
TO Calv1s
If you understand French and love Camels and Jokes, read my
Jokes about Camels in my WebSite and tell me how to use your ACL units:
Adventures of Ali the Camel driver
"Les Aventures d'Ali le Chamelier"
www.AtlasCouscous.com