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
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

C#: MapPoint 2004 - Check Regions

This is a discussion on C#: MapPoint 2004 - Check Regions within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, i've created an C#-App which uses the MapPoint2004 ActiveX-Control to steadily show the GPS-Position of some vehicles connected to ...

  1. #1
    suamikim is offline Junior Member White Belt
    Join Date
    Nov 2005
    Posts
    9

    C#: MapPoint 2004 - Check Regions

    Hi,

    i've created an C#-App which uses the MapPoint2004 ActiveX-Control to steadily show the GPS-Position of some vehicles connected to the software.

    The next step would be the following, but i don't know, if, and especially, how i can achieve this:

    The program should be able to check if the specified vehicle is located in a specified area. If the vehicle leaves this area (lets say a country or even a single city), the program should alert the user (respective it would be brilliant if it would be possible, that the program alerts the user, when the vehicle comes near a boundary of the specified area, but thats all still up in the air).

    I know that it is possible to specify territories in MapPoint. Is it now possible to read them into my C#-App and check if a concrete GPS-Position is within or outside this territory/ies?

    Hope, someone can help me!

    thanks & regards

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: C#: MapPoint 2004 - Check Regions

    Hi,

    I never tried this. I think if you use FindaddressResults or FindPlaceResults for a location in a territory you get a collection of Location objects. Possible 1 of the location objects is having the Type property to 4 (Territory), and I assume the Name property is the name of the Territory.

    Please feedback if it works that way. It will benefit others

  3. #3
    suamikim is offline Junior Member White Belt
    Join Date
    Nov 2005
    Posts
    9

    Unhappy Re: C#: MapPoint 2004 - Check Regions

    Thanks for you answer, but i must concede, that i don't really get what you mean.

    To use FindaddressResults or FindPlaceResults i need to know a concrete street, city, region, postal code or country to search for. The problem is, that i only have the GPS-Data of the vehicle and need to get the corresponding address (street, city, country, ... even country would be enough, but the more exact, the better it is).

    Hope you know what i mean...

    thks

    ps.: I'm from austria, so my english isn't the best, therefor it could possible be, that i just didn't get what you meant, because of translation-problems

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: C#: MapPoint 2004 - Check Regions

    Hi,

    Sorry you right. What if you try GetLocation ? It has a Name, PlaceCategory, Type property. Possible you can see which is the territory ?

  5. #5
    suamikim is offline Junior Member White Belt
    Join Date
    Nov 2005
    Posts
    9

    Re: C#: MapPoint 2004 - Check Regions

    Ok, this could work. I haven't tried it by now cause of little time.

    If this works there would be another requirement:

    The program should be able to read regions/territories which have been created in MapPoint (so the user can decide on his own, how many countries, states or even just cities he wants to allow).

    Is it possible to read this so created files and check the positions of the vehicles?

    I hope, i explained it in a understandable way!

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: C#: MapPoint 2004 - Check Regions

    Hi,

    I dont think you can create territories in mappoint. I think you only can import them. Please dont slap me if I'm wrong, I never tryed mutch in the standalone executable

    Anyway if it is imported data then there is no problem because you can import it into your program as well.

  7. #7
    suamikim is offline Junior Member White Belt
    Join Date
    Nov 2005
    Posts
    9

    Re: C#: MapPoint 2004 - Check Regions

    I'm not gonna slap you, but i gotta tell you, that you're wrong

    You can do this the following way:

    Data -> Territories/Regions (in German it's "Gebiete" and i don't exactly know, how it is called in the English version but i think it's territories cause the shortcut is Strg+T).
    Next you have to choose "create manually" and the type of geographical unit (postal code, township, canton, state or country/region).

    This way you can select some regions on the basis of the selected geographical unit.

    E.g. i have created a region with 3 countries (Germany, Austria, France), which i can save either as a "MapPoint-Map (*.ptm)" or a Maptemplate (*.ptt)"):


    Now i want to be able to read this so created region in my c#-App and check if a specific location (vehicle) is in it's boundaries.

    thanks & regards

  8. #8
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: C#: MapPoint 2004 - Check Regions

    Hi,

    Thank you for pointing it out to me. I tryed it now I think it is time to try what has previously discussed to see if it works. I try it out as soon as I have a moment of time and give feedback. Please do the same.

  9. #9
    suamikim is offline Junior Member White Belt
    Join Date
    Nov 2005
    Posts
    9

    Re: C#: MapPoint 2004 - Check Regions

    Ok, i'm gonna give you a feedback, but i'm afraid that it won't be in the next days, cause theres a lot to do these days...

    I just started the thread to get some information BEFORE i start implementing it

  10. #10
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: C#: MapPoint 2004 - Check Regions

    Hi,

    I just tryed it myself. Could not get indication if location was in or out a territory

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Territories - Regions - Reps and other great ideas.
    By Anonymous in forum Wish List
    Replies: 1
    Last Post: 04-27-2009, 01:48 PM
  2. Check out if GPS pos is on a Route
    By kristijan in forum MapPoint Desktop Discussion
    Replies: 11
    Last Post: 04-19-2006, 11:46 AM
  3. How do I check to see if there is mappoint installed on a sy
    By dew1969 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 02-18-2004, 11:05 AM
  4. Territories, regions help please
    By norty303 in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 11-14-2003, 10:56 AM
  5. MapPoint 2002 Retrieve all regions of a country VB6
    By Wim in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 11-15-2002, 10:45 AM

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 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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96