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 2 12 LastLast
Results 1 to 10 of 11

Adding data and displaying territorries

This is a discussion on Adding data and displaying territorries within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I'm just starting with MapPoint 2004 and now using it as ActiveX Control in C#. I browsed a lot ...

  1. #1
    fridi69 is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    5

    Adding data and displaying territorries

    Hi, I'm just starting with MapPoint 2004 and now using it as ActiveX Control in C#.
    I browsed a lot of articles and newsgroups but I did not find a simple guideline how to do this by COM:
    Add some data (two fields: ZIP-Code, income), display it in zip-code regions and color the regions depending on the income.
    Does anybody have an example ? (the progr. language doesnīt matter, the COM methods and fields will be the same).
    Thanks in advance,
    Friedhelm

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

    This question has comed up here already. Try to do a search on "income" on this forum, chance is high you find already what you look for.

  3. #3
    fridi69 is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    5
    Hi, I did a search on "income", but the there is nothing that points into my direction. I found some articles, in all of them data is imported from xls or whatever .What I want to do is adding the data by COM. There is a great object model, but what to use - DataSet, DataMap, DataFields. All explained detailled in msdn, but I donīt find a bundled example.

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

    Ok, but I do not exacly understeand then what you wants to do. Can you explain more ? I understeand you want to add something to a dataset but do not understeand how.. waht..

  5. #5
    fridi69 is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    5
    OK, let me try..

    I want to add 10 pairs of data, 1st column is a zip code (or zip area) , the 2nd is an integer value. I want to display the 10 locations as shaded areas and the integer value determines the color of the area.
    I can do all this easily in the mappoint GUI with the wizards, but I want to do this by using the COM interface from my app. I managed to read the data from xls files, but tha is not want I want to do.

    Thanks in advance,
    Friedhelm

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

    I never used them, but have a look at ImportData or DisplayDataMap methods (one of them shure will do what you wants to do).

  7. #7
    fridi69 is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    5
    Hi,
    I managed to import data from xls using
    MapPoint.DataSet set1 = map.DataSets.ImportData(...)

    After that, I display this set using

    Code:
    DataMap dataMap = set1.DisplayDataMap(...).
    That works. I want to create the DataSet manually. Creating the dataset is easy

    Code:
    MapPoint.DataSet set2 = map.DataSets.AddPushpinSet("myset");
    Now I have to add the "locations" to the set, but donīt know how...

  8. #8
    fridi69 is offline Junior Member White Belt
    Join Date
    Jul 2005
    Posts
    5
    Ok, I took one hurdle:

    It seems that there is now way to insert a location into the dataset of my choice. So I create a pushpin that will be added to the standard set by default. Afterwords, I have to move it to my set:

    Code:
    // create the dataset
    MapPoint.DataSet set1 = map.DataSets.AddPushpinSet("Patients");
    
    //resolving the Location using FindAdressResults in a seperate method
    MapPoint.Location loc = ...
    
    // create the pushpin
    MapPoint.Pushpin pin = map.AddPushpin(loc,"location");
    // and move it to set1
    pin.MoveTo(set1);

    I can even display the set on the map by

    Code:
    set1.DisplayPushpinMap();
    But if I want to display the pins from set1 as a shaded area, I have to use DisplayDataMap() with several parameters.

    One of them is the parameter field, which I donīt know how to declare right. All the examples in the web use an internal dataset of demographical data, now a dataset created manually.

    Still open: where to add the additional value to determine the color of the area?

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

    Dont know how to set area color. Did a little search in the help but could not fount it. I hope someone else will drop in here.

    btw: tanks for feedback, it benefit others.

  10. #10
    Fabio is offline Junior Member White Belt
    Join Date
    Oct 2005
    Posts
    9
    Hi,

    I don't think it's possible to use DisplayDataMap() function with manually created Datasets.
    In fact it appears that Fields.Count for pushpinset is always 0.

    Byeee

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding large amount of data to my map, what's the best way?
    By Candace in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 03-14-2006, 11:20 AM
  2. Displaying a few simple data numbers per state on a US map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-05-2005, 07:03 AM
  3. Adding Non-Numerical Data
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-10-2004, 11:33 AM
  4. displaying custom data on Pushpins when linked
    By TheJudge in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-13-2004, 09:53 AM
  5. Need Assistance with Displaying CSV data by City
    By SideStep in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 01-05-2004, 12:18 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