MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




which dataset belong a pushpin ?

This is a discussion on which dataset belong a pushpin ? within the Development forums, part of the MapPoint 2006/2009 Discussion category; Hi, I want to avoid the user can change the name of the pushpins. I can do it in this ...


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

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



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 10-17-2008
Junior Member
Yellow Belt
 
Join Date: Jun 2008
Posts: 15
which dataset belong a pushpin ?

Hi,
I want to avoid the user can change the name of the pushpins.
I can do it in this way, in the Mappointcontrol_selectionchange event:

IfTypeOf (e.pOldSelection) Is MapPoint.Pushpin Then
e.pOldSelection.name = Old_PushpinName
EndIf
IfTypeOf (e.pNewSelection) Is MapPoint.Pushpin Then
Old_PushpinName = e.pNewSelection.name
EndIf

It works, but I want to restrict this only to some pushpins that belong to a specific dataset. So, how see which dataset belong a pushpin ?

Thanks
Marco
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 10-21-2008
Auge_Ohr's Avatar
Member
Green Belt
 
Join Date: Sep 2008
Location: Hamburg, Germany
Posts: 60
Re: which dataset belong a pushpin ?

hi,
Quote:
Originally Posted by marcick View Post
It works, but I want to restrict this only to some pushpins that belong to a specific dataset. So, how see which dataset belong a pushpin ?
depending on your Application i might have a Solution:

a.) Pushpin:name := Customer ID
b.) Subscribe Event BeforeClick
c.) write your own Methode belong to BeforeClick
d.) in :MPBeforeClick(Button, Shift, X, Y, Cancel) use
Code:
//
// this will open "my*.PTM" as Recordset called "Meine Pins"
//
::oPinMap := ::oMap:OpenMap(cPinLocal):DataSets(1)


METHOD XbMap:MPBeforeClick(Button, Shift, X, Y, Cancel)
oLoc := ::oMap:ActiveMap:XYToLocation(X,Y)
...
oNearBy := oLoc:FindNearby(nKM)
iMax := oNearBy:Count()
FOR i := 1 TO iMax
   oPushPin := oNearBy:item(i)
   cName := UPPER( oPushPin:interfaceName() )

   IF cName = "PUSHPIN"
      nValue := oLoc:DistanceTo( oNearBy:item(i):Location() )
      oNearBy := oLoc:FindNearby(nValue)
      EXIT
   ENDIF
NEXT
if nKM is big enought i get the nValue to next Customer Pushpin.
btw. i did have "disable" all "places" so i do only "see" "Meine Pushpin"

This Distance is need for
Code:
::oPinRec   := ::oPinMap:QueryCircle(oLoc,nValue)

DO WHILE .NOT. ::oPinRec:EOF()
   ::oPinRec:Pushpin:BalloonState := geoDisplayName
   ::oPinRec:MoveNext()
ENDDO
to show Balloon from Customer and(!) User can not "move" any PushPin
while you have "intercept" User "click" Event.

e.g. you shoud make something also with BeforeDblClick

Last edited by Auge_Ohr; 10-22-2008 at 01:07 AM.
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 10-22-2008
Junior Member
Yellow Belt
 
Join Date: Jun 2008
Posts: 15
Re: which dataset belong a pushpin ?

Sorry but I didn't understand ...
I explain better my problem:

From my VB.NET application, I create some pushpins with different names (1532, 6543, 9980, etc) and then I move these pushpins to "mydataset1" .
Then I create other pushpins with other names and move them to "mydataset2" and so on.
The user also can create pushpins directly on the map and they belong to the default mappoint dataset.

Ater all, when the user click on one pushpin on the map, how my application can understand wich dataset belong the pushpin ? Mydataset1, mydataset2, etc ?

Marco
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 10-22-2008
Auge_Ohr's Avatar
Member
Green Belt
 
Join Date: Sep 2008
Location: Hamburg, Germany
Posts: 60
Re: which dataset belong a pushpin ?

hi,
Quote:
Originally Posted by marcick View Post
After all, when the user click on one pushpin on the map, how my application can understand wich dataset belong the pushpin ? Mydataset1, mydataset2, etc ?
ok, 2nd try : you have the :Name of each Pushpin so you can load a Dataset,
use FindPushPin() to see if you find it in that Dataset, else use next Dataset
and do it again.

If the Map was saved an you use OpenMap, you have to spezify your Dataset
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 10-23-2008
Junior Member
Yellow Belt
 
Join Date: Jun 2008
Posts: 15
Re: which dataset belong a pushpin ?

It doesn't work, because the user can also create a pushpin on the map with the graphic tools and he can give it the same name.
I mean this:

1) the map is empty.
2) my .net application create a pushpin "John" and move it to mydataset1
3) the user create another puspin "John" and it belongs to the default mappoint dataset
4) non we have two puspin "John" on the map
5) the user select with the mouse one of these two pushpin and try to change its name
6) I want that if the pushpin is mine (mydataset1) name change is not allowed, otherwise yes.

It would be so easy if every pushpin has a property that specify wich dataset belongs to ....

Marco
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
belong, dataset, pushpin


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/dataset-belong-pushpin-8913.html

Posted By For Type Date
MapPoint Help - MP2K Magazine This thread Refback 10-17-2008 03:01 PM

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
Highlight all pushpin in dataset? Kevin_Williams MapPoint 2006/2009 Discussion 1 12-21-2006 06:47 AM
PushPin dataset is saved in .ptm? PeppeM MapPoint 2006/2009 Discussion 1 05-06-2006 01:53 PM
delphi iterate pushpin dataset merlino MapPoint 2006/2009 Discussion 1 10-12-2004 10:20 AM
Find Nearby Pushpin in dataset Dazzer Products: Pushpin Tool, Single State Mapper 1 10-16-2003 04:05 PM
Problems with Pushpin dataset Sylvain MapPoint 2006/2009 Discussion 13 11-28-2002 08:08 AM


All times are GMT -5. The time now is 02:00 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, 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