Community of VE/MapPoint Users and Developers
This is a discussion on C#: MapPoint 2004 - Check Regions within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| C#: MapPoint 2004 - Check Regions 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 |
| |||
| 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
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 |
| |||
| 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 ?
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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! |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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 |
| |||
| Re: C#: MapPoint 2004 - Check Regions
Hi, Thank you for pointing it out to me. I tryed it now
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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 |
| |||
| Re: C#: MapPoint 2004 - Check Regions
Hi, I just tryed it myself. Could not get indication if location was in or out a territory
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| ||||
| Posted By | For | Type | Date | |
| MapPoint Articles - MP2K Magazine | This thread | Refback | 12-16-2006 01:16 AM | |
| Wisconsin Map and Map of Wisconsin - MapPoint State Map Gallery - MP2K Magazine | This thread | Refback | 12-14-2006 06:59 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 12-12-2006 04:37 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Check out if GPS pos is on a Route | kristijan | MapPoint 2006/2009 Discussion | 11 | 04-19-2006 10:46 AM |
| How do I check to see if there is mappoint installed on a sy | dew1969 | MapPoint 2006/2009 Discussion | 3 | 02-18-2004 10:05 AM |
| Territories, regions help please | norty303 | MapPoint 2006/2009 Discussion | 0 | 11-14-2003 09:56 AM |
| Territories - Regions - Reps and other great ideas. | Anonymous | Wish List | 0 | 03-21-2003 12:43 PM |
| MapPoint 2002 Retrieve all regions of a country VB6 | Wim | MapPoint 2006/2009 Discussion | 0 | 11-15-2002 09:45 AM |
Amsterdam Flights
Use Holiday Hypermarket to check out the availability of cheap Amsterdam flights. It is a stunning city with much to offer. Don't miss the Van Gogh museum...
Travelcounselors
TravelCounsellors are a Queens award winning Travel Agent. Have a personal Travel Counselor help with your travel plans.
Holiday to Thailand
Want to go somewhere new? Book a low cost holiday to Thailand at dealchecker.co.uk. See the stunning national parks and uninhabited islands.
Cuba Holidays
Cuba holidays offer an exciting cultural and wonderful culinary experience. Book with The Holiday Place for a great deal.
Holidays
For bargain holidays to destinations including Mexico, South Africa, India and more, visit ULookUBook online today. Check out our free travel guides to help you make an informed decision for your holidays.
Cheap package holidays
Use Travel.co.uk to find the best cheap package holidays available. Have fun and save money at the same time
Holidays in Fuerteventura
Need a break? Go to the Canary Islands! Find information on holidays in Fuerteventura at On The Beach.