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 6 of 6

displayDataMap question again

This is a discussion on displayDataMap question again within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi all, I'm still looking for help using the displayDataMap function. Maybe some sample code I've tried make the problem ...

  1. #1
    chpw is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    26

    displayDataMap question again

    Hi all,

    I'm still looking for help using the displayDataMap function. Maybe some sample code I've tried make the problem more clear:

    Code:
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            Dim objDataSets As MapPoint.DataSets
            Dim objDataSet As MapPoint.DataSet
            Dim zDataSource As String
            Dim ls_field(15, 1) As Object
    
            Dim ls_cValues() As String = {"NSTR", "STRT", "FRTG+", "FRTG-", "ROUT"}
            Dim ls_cLabels() As String = {"L1", "L2", "L3", "L4", "L5"}
            Dim ls_cNames() As String = {"NichtBegonnen", "Begonnen", "Abgeschlossen", "Fertig", "Geroutet"}
            Dim ll_cSymbols() As Integer = {1, 2, 3, 4, 5}
            Dim objField As MapPoint.Field
    
            ls_field(0, 0) = 1
            ls_field(0, 1) = MapPoint.GeoFieldType.geoFieldData
    
            ls_field(1, 0) = 2
            ls_field(1, 1) = MapPoint.GeoFieldType.geoFieldData
    
            ls_field(2, 0) = 3
            ls_field(2, 1) = MapPoint.GeoFieldType.geoFieldName
    
            ls_field(3, 0) = 4
            ls_field(3, 1) = MapPoint.GeoFieldType.geoFieldInformation
    
            ls_field(4, 0) = 5
            ls_field(4, 1) = MapPoint.GeoFieldType.geoFieldAddress1
    
            ls_field(5, 0) = 6
            ls_field(5, 1) = MapPoint.GeoFieldType.geoFieldCity
    
            ls_field(6, 0) = 7
            ls_field(6, 1) = MapPoint.GeoFieldType.geoFieldPostal1
    
            ls_field(7, 0) = 8
            ls_field(7, 1) = MapPoint.GeoFieldType.geoFieldLatitude
    
            ls_field(8, 0) = 9
            ls_field(8, 1) = MapPoint.GeoFieldType.geoFieldLongitude
    
            ls_field(9, 0) = 10
            ls_field(9, 1) = "Arbeitszeit"
    
            ls_field(10, 0) = 11
            ls_field(10, 1) = MapPoint.GeoFieldType.geoFieldData
    
            ls_field(11, 0) = 12
            ls_field(11, 1) = MapPoint.GeoFieldType.geoFieldData
    
            ls_field(12, 0) = 13
            ls_field(12, 1) = MapPoint.GeoFieldType.geoFieldData
    
            ls_field(13, 0) = 14
            ls_field(13, 1) = MapPoint.GeoFieldType.geoFieldData
    
            ls_field(14, 0) = 15
            ls_field(14, 1) = MapPoint.GeoFieldType.geoFieldData
    
            ls_field(15, 0) = 16
            ls_field(15, 1) = MapPoint.GeoFieldType.geoFieldData
    
            zDataSource = "C:\tmp\testadressen.txt"
            objDataSets = AxMappointControl1.ActiveMap.DataSets
            objDataSet = objDataSets.ImportData(zDataSource, ls_field)
    
            objField = objDataSet.Fields("frtscode")
    
            objDataSet.DisplayDataMap(MapPoint.GeoDataMapType.geoDataMapTypeMultipleSymbol, _
                                        objField, MapPoint.GeoShowDataBy.geoShowByLatLong, _
                                        MapPoint.GeoCombineDataBy.geoCombineByNone, _
                                        MapPoint.GeoDataRangeType.geoRangeTypeDefault, _
                                        MapPoint.GeoDataRangeOrder.geoRangeOrderDefault, -1, 5, ls_cValues, ls_cNames, objField, ls_cLabels, ll_cSymbols)
    This code runs until the displayDataMap function is called. Then an argument exception raises. Have played around with the arguments but no luck showing a map with 5 different symbols depending on the field # 16 ("frtscode") which contains 5 different values.
    Any help?

    TIA

    Chris Werner

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Hi Chris,

    Did you figure this out?

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

  3. #3
    chpw is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    26
    Hi Eric,

    yes, got it to work in VB. After changing the following
    declarations:
    Code:
    Dim ls_cValues() As String = {"NSTR", "STRT", "FRTG+", "FRTG-", "ROUT"}
    Dim ls_cLabels() As String = {"L1", "L2", "L3", "L4", "L5"}
    Dim ls_cNames() As String = {"NichtBegonnen", "Begonnen", "Abgeschlossen", "Fertig", "Geroutet"}
    Dim ll_cSymbols() As Integer = {1, 2, 3, 4, 5}
    into Array of Object and using

    Code:
    Dim missing As Object = System.Reflection.Missing.Value
    for unused arguments it works. Unfortunately my final goal
    to use DisplayDataMap() in another development environment
    (Sybase PowerBuilder) fails to work. It seems that there is no
    apropriate data type there. So I go along the addPushpin()
    way.

    BTW, I'd like to layout code snippets as code in my posts
    but have no idea how to do that. Using <code> </code>
    markers seems to be the wrong approach.

    Kind regards,
    Chris Werner

  4. #4
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Use the square brackets, I edited your post so you can see.

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

  5. #5
    chpw is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    26

    Thanks!

    Hi Eric,

    I got it, 1000 thanks for the tip!

    Code:
    for i = 1 to 1000
        thanks2&#40;"Eric Frost"&#41;
    next
    Kind regards,
    Chris Werner

  6. #6
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    That's too many. 1 or half of one will do

    In any case, I want to convert this whole forum to vBulletin and then everything will change (for the better).

    The only real concern will be the old links, I'll be checking the logs and tackle them (edit old posts) as they appear.

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

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. DisplayDataMap
    By chpw in forum MapPoint Desktop Discussion
    Replies: 9
    Last Post: 02-14-2011, 08:26 PM
  2. DisplayDatamap and ArrayOfCustomValues
    By PGLRepDev in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 07-22-2010, 12:04 PM
  3. DisplayDataMap method c#
    By fletch in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-08-2005, 07:26 AM
  4. DisplayDataMap in Delphi 7
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 12-17-2004, 06:59 AM
  5. DisplayDataMap and C#
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-04-2003, 02:15 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