MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




FindPushpin(Name)

This is a discussion on FindPushpin(Name) within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I would like some help please. My problem is I import data using 'DisplayDataMap' and that works great. The problem ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-16-2005
Junior Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 25
FindPushpin(Name)

I would like some help please.

My problem is I import data using 'DisplayDataMap' and that works great.

The problem comes when I have to change the Pushpinsymbol. The code I am using is listed below

Do While Not objRS.EOF
If objRS.Fields(10) <> "n" Then
location = objRS.Fields(1)

Set objLoc = objmap.FindResults(location).Item(1)

PushpinType = objRS.Fields(10)

Name = objRS.Fields(3)
If IsNumeric(PushpinType) <> 0 Then 'Check if the PushpinType is standard ie numberic value
Set objSymbol = objmap.Symbols.Item(CInt(PushpinType)) ' Convert String value to Integar. Display the standard symbol equal PushpinType value
Else
Set objSymbol = objmap.Symbols.Add(PushpinType) 'Display Customised Pushpin symbol
End If

Set objPin = objmap.FindPushpin(Name)

At the line Set objPin = objmap.FindPushpin(Name) i get an error message

"The requested property is unavailable"

Could you please advise how else I can improve this?


Many thanks in advance
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 08-17-2005
Member
Green Belt
 
Join Date: Mar 2005
Posts: 96
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
__________________
Mohamed
www.AtlasCouscous.com
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 08-17-2005
Junior Member
Yellow Belt
 
Join Date: Dec 2004
Posts: 25
FindPushpin(Name)

thanks Mohamed

I have already tried that method but its takes a long time. I need a way to speed up the process
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 08-17-2005
Member
Green Belt
 
Join Date: Mar 2005
Posts: 96
Hi Yazzy,

I tried the two methods. And I have always faster response with my own databases outside Mappoint. Anyway I have more control when I have to debug an error.

I've added more than 30000 pushpins in my map.
The first time, it takes some time. But when it's saved as atlas.ptm,
I can change in 10 seconds more than 1000 symbols.

How did you added pushpins?

Rgds
__________________
Mohamed
www.AtlasCouscous.com
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

Tags
findpushpinname


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
FindPushpin problem Anonymous MapPoint 2006/2009 Discussion 2 10-29-2004 09:13 AM


All times are GMT -5. The time now is 10:49 PM.


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


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 52 53 54 55