Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

find city name & state name on mouse move event

This is a discussion on find city name & state name on mouse move event within the MapPoint Desktop Discussion forums, part of the Map Forums category; How do you find name of the city and the corresponding state on mousemove event (using the mouse coordinates). I ...

  1. #1
    Atul22 is offline Junior Member White Belt
    Join Date
    Sep 2004
    Posts
    6

    find city name & state name on mouse move event

    How do you find name of the city and the corresponding state on mousemove event (using the mouse coordinates). I have tried using method ObjectsfromPoint(x,y) but it doesnt seem to help much. Moreover to properties City & State can only be obtained if you have Street Address.

    Thanks
    Atzy

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    This really isn't supported.. you could explore and use one of the Reverse Geocoding techniques, there are three articles on the topic on this web site.

    I think it might involve a timer and periodically creating and destroying a temporary pushpin. Note that the reverse geocoding techniques can take .25 to 1 second, so it's not exactly instantaneous..

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    to match a place when the mouse move

    try this

    Dim objResults As MapPoint.FindResults
    Dim objResult As Object
    Dim i As Integer

    Set objResults = objMap.ObjectsFromPoint(X, Y)

    If objResults.Count > 1 Then
    For i = 2 To objResults.Count
    Set objResult = objResults.Item(i)
    If objResult.Type = 12 Then
    strCP = objResult.Name
    lblCP = objResult.Name
    ElseIf objResult.Type = 16 Then
    lblCommune = objResult.Name
    End If
    Next i
    end if

    I use it in a beforclick event to disply the postal code and the county name (Commune) on a labels on a form (12 and 16 types)
    It's working fine but.. when the cursor pass on thematic map. th findResults collection seems to "change" in her behavior.. so the "type" property is NOT allowed. An error ocurred. For me the model object of Mappoint is lacking of consistency .
    Anyone as a solution?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ActiveX MapPointControl: How to find county from City, State
    By UncleJaz in forum MapPoint Desktop Discussion
    Replies: 13
    Last Post: 09-12-2006, 04:34 PM
  2. How do you find the territory for a given city and state
    By UncleJaz in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 04-05-2006, 11:50 AM
  3. Finding Longs and Lats on mouse Move
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-22-2004, 04:12 AM
  4. Capture the Pushpin move event
    By Maverick in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-14-2003, 02:34 AM
  5. Ist it possible to get X, Y from mouse move
    By blackmap in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-16-2002, 04:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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