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

array of locations

This is a discussion on array of locations within the MapPoint Desktop Discussion forums, part of the Map Forums category; Is there a way to make a dynamic array ? All samples I found until now use following syntax. The ...

  1. #1
    Bart Vervenne is offline Junior Member White Belt
    Join Date
    Apr 2003
    Posts
    4

    array of locations

    Is there a way to make a dynamic array ?
    All samples I found until now use following syntax. The don't allow to change the upper limit of the array, or to use a variable instead.
    Dim objLocs(1 To 5) As MapPoint.Location
    When i try to use the standard VB way to create a dynamic array :
    Dim objLocs() As MapPoint.Location
    PPCount = 10
    Redim objlocs(PPcount[/i])
    I always get an error on the line where the polygon is added.
    mymap.shapes.addpolygon objlocs
    My problem is that I want to draw different polygons on my map , depending on data in an access database.
    Sorry about my bad english, I hope someone understands my problem and is able to give me some advice.

    Thanks a lot
    [/i]

  2. #2
    Bart Vervenne is offline Junior Member White Belt
    Join Date
    Apr 2003
    Posts
    4

    Array of locations

    Correction of previous topic
    Is there a way to make a dynamic array ?
    All samples I found until now use following syntax. They don't allow to change the upper limit of the array, or to use a variable instead.
    Code:
    Dim objLocs(1 To 5) As MapPoint.Location
    When i try to use the standard VB way to create a dynamic array :
    Code:
    Dim objLocs() As MapPoint.Location, PPCount as integer 
    PPCount = 10 
    Redim objlocs(PPcount)
    I always get an error on the line where the polyline is added.
    Code:
    mymap.shapes.addpolyline objlocs
    My problem is that I want to draw different polylines on my map , depending on data in an access database.
    Sorry about my bad english, I hope someone understands my problem and is able to give me some advice.

    Thanks a lot

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

    array of locations

    You can do the following:

    Redim objlocs(1 to PPcount[/i]-1)

    That might work. Or try:

    Option Base 1

    somewhere in the code.

  4. #4
    Bart Vervenne is offline Junior Member White Belt
    Join Date
    Apr 2003
    Posts
    4

    array of locations

    Thanks for your reply. It works.
    Indeed arrays in mappoint cannot be zero based for some obscure reason

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help! Import Custom Symbol Array
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 03-24-2011, 09:45 AM
  2. SetFieldsVisibleInBalloon - how do I set up the array
    By jtowell in forum MapPoint Desktop Discussion
    Replies: 7
    Last Post: 05-16-2005, 12:59 PM
  3. How to access to an array of pushpins that were added ?
    By Jaba in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 01-13-2005, 06:20 AM
  4. Addpolyline , Array , Visual Basic and Other languages
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-26-2004, 03:58 AM
  5. Importing address with an array of fields specified
    By jscott099 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-30-2003, 10:10 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 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