MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Pushpin

This is a discussion on Pushpin within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Sorry for my english If i have a location, how i con know the name of pushpin that is in ...


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-29-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Pushpin

Sorry for my english

If i have a location, how i con know the name of pushpin that is in that location?

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-30-2004
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 37
Use the name property of your location object: objLoc.Name
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-30-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
thanks but...

Sorry, but the question is:

i like to know what is the of a PushPin when I press the right Button.
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 07-02-2004
Member
Yellow Belt
 
Join Date: Jun 2004
Posts: 37
I've not really done much with all this but I played around for a while and this code will make the pushpin name box pop up when you right click on a pushpin

Code:
 Private Sub objMap_BeforeClick(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean)
    On Error GoTo Err_OnClick
    Dim objResults As Mappoint.FindResults
    Dim objResult As Object

    If Button = 2 Then
    'Display the name of the object best matching where user clicks on map
    Set objResults = objMap.ObjectsFromPoint(X, Y)
      objResults.Item(1).BalloonState = geoDisplayName
    Cancel = True
    End If
    
Exit_OnClick:
    If Err <> 0 Then
        MsgBox Err & " " & Err.Description
    End If
    Exit Sub

Err_OnClick:
    'If the object isn't a pushpin then ignore it
    If Err = 438 Then
    Resume Next
    Else
    Resume Exit_OnClick
    End If

  End Sub
It uses the ObjectsFromPoint() Method to find objects around a screen coordinate. This includes addresses as well as pushpins, but we're only interested in pushpins, so we take only the first record returned by ObjectsFromPoint(). Also this method can return addresses and other locations in addition to pushpins, but that'll screw things up so there is the error handling that ignores the times when a user clicks an area where there is no pushpin.

Also, I added the "Cancel = True" to prevent the menu from coming up on the right click (Button = 2)

One more thing, be sure to include the "WithEvents" keyword when you declare you objMap

Hopefully this is along the lines of what you were looking for
-Jake
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 07-03-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
GRACIASSSSSSSSSSSS

VERY VERY VERY 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
  #6 (permalink)  
Old 07-05-2004
Junior Member
White Belt
 
Join Date: May 2004
Posts: 9
Re: thanks but...

Hola Eva.

Para hacer lo que necesitas tienes que usar primero el método ObjectsFromPoint (que te coge todos los objetos que hay en un punto), y luego el método objFindResults.Item(1) para tener acceso a ese objeto que haya donde hayas pinchado.

En este caso yo sé que donde pincho hay un objeto pushpin:

Set objFindResults = objMapa.ObjectsFromPoint(x, y)
Set objPin = objFindResults.Item(1)

Lo del botón derecho del ratón creo que lo puedes controlar con If button=2 then .....
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
Finding Pushpin Name by clicking on the Pushpin?(MP 2002) NickSP MapPoint 2006/2009 Discussion 4 01-10-2003 12:11 PM


All times are GMT -5. The time now is 08:48 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

Ski Holidays Andorra
Ski holidays in Andorra offer value for money right across the board. Clothes, meals and accommodation are great value with duty free prices. Book great value ski holidays today.

Flights to Italy
Find cheap flights to Italy on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Italy.

Thailand Holiday
A Thailand Holiday has much to offer with historic culture, lively arts, beautiful beaches, a good nightlife, friendly and hospitable people and one of the best cuisines in the world.

Nile Cruises
Nile cruises are one of the best ways to discover the riches of Egypt. See ancient ruins and lush verdure from the River Nile. Book today!

Cheap Egypt Holidays
Pick up a bargain cheap Egypt holiday online when you visit ulookubook.com. Just check out our tips to make sure you book at the right time to get a great holiday for a great price. Finding cheap Egypt holidays can be simple when you know how.

Holiday
For the holiday of your life, that is easy to plan, visit Travel.co.uk to see all the options.

Cheap Holidays in Gran Canaria
Would you like to visit the Canary Islands, but you're on a budget? Get information on cheap holidays in Gran Canaria 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