GPS Maps (IMG, MP) Integration-VBForums
Results 1 to 10 of 10

Thread: GPS Maps (IMG, MP) Integration

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    5

    GPS Maps (IMG, MP) Integration

    Hello,

    I'm doing an app in VB6 that need to have a street map of my city.
    I though in using google maps, but my city does not have the street map there, so I need to use a GPS map.
    I have some of them and they looks fine, but I have no idea how to use them in VB.

    I have Garmin IMG maps, I don't found any ocx to use them.
    Then I conver them to MP (Polish Format), also I did not found anything to use them in VB.
    Finally I found some ocx to use SHP format maps, I convert the map from MP to SHP, but they don't look fine... the street labels are horizontals and not follow the street way, so it's really ugly.

    Anybody have experience with this? I don't mind in buy a ocx, but I need to know that it will let me put a IMG or MP map in VB and use it with coords (lat/long).

    Also, if anybody know how to convert a IMG map to SHP correctly will help too.

    Thanks in advance,

    Jonathan

  2. #2
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: GPS Maps (IMG, MP) Integration

    Have you tried other map sites? What city is it that you are having problems with?

    If it's in the UK, you should be able to use www.streetmap.co.uk for instance :-)

    If you want the cheaper option (free, although not perfect...couldn't use it commercially as the Garmin maps are copyrighted) you could convert the IMG maps to GIF/JPG and write your own lat/long conversion code to pinpoint where to display...I've written basic software like that for displaying map data, it's very simple to do :-)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    5

    Re: GPS Maps (IMG, MP) Integration

    Hello Smux, thanks for your reply, it's interesting what you said about jpg.
    There are a lot of cities that I need to use, basically I need to use it with south america, and it's not well documented.

    Then, I think that convert a south america img map to jpg could generate a big big jpg file... maybe I can cut it in a lot of parts....

    I will take a look at that to see how to do it, by the way, if you can help me in how can i apply my lat/long conversion, I will appreciate that.

    Thanks

  4. #4
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: GPS Maps (IMG, MP) Integration

    The trick is NOT to have one huge map, it is to have lots of smaller files. Most map sites use tiles. Even 100x100 tiles at maybe 8k each is 80MB of data, and 100x100 is probably enough to cover a fair few LARGE cities.

    Also, they use a simple function to calculate which tile to display and then which part of the tile to point to...the same sort of thing I did :-)

    However, if you look around you might find a way to display the map format yourself...I've taken a quick look around and it seems to be a vector-based system, but I am sure there's better places to ask for help with that :-)

    http://www.malsingmaps.com/wiki/inde...armin_software might be of use to you too
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  5. #5
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: GPS Maps (IMG, MP) Integration

    And regarding the actual method for working out lat/long details...

    Let's say we had 10x10 tiles, and the top left of the one at 1-1 is lat 1 long 1 with the width being 100 and height being 100...top left of the one below and to the right of the top left one (at 2-2) would be lat 101 long 101 at the top left...you see where this is going? :-)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    5

    Re: GPS Maps (IMG, MP) Integration

    smux, that's interesting and very helpful... I will try that method to see what can i do.

    Thanks again for your help!

  7. #7

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    5

    Re: GPS Maps (IMG, MP) Integration

    smux, just one more question. English is not my native language, so I'm a bit lost sometimes...
    How can I look for vb examples using tiles? because all I found with "tiles" are other type of images...

    The only way I can image is to put several picturesbox (suppose 5x5) and show there different images (tiles)... but I think that is not the best way? maybe there is some ocx?

    hope you can help me.

    Thanks

  8. #8
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: GPS Maps (IMG, MP) Integration

    I say tiles just as a general word (you say earlier about cutting it into parts...imagine each of those parts being square and 100x100...that's a tile ), and I am going to explain to you *exactly* how I displayed my map in my program to make it easy for me to work with.

    I used a frame with a selection of tiles. Let's say you wanted to view map tile 3-3...I had 2-2/2-3/2-4 at the top, 3-2/3-3/3-4 in the middle and 4-2/4-3/4-4 at the bottom in this frame, so 9 tiles in total in a 3x3 grid.

    Now the "clever" bit, I had this frame inside a smaller frame which only showed the total space of 2x2 (or 4) tiles. I could move the inner (3x3) frame around inside this frame and it looked like the whole map was moving around as one big picture because as soon as it got to the edge I would move across one tile (so where it was displaying 2-2/2-3/2-4 it switched to displaying 2-3/2-4/2-5 in the top row, and I won't bother describing the other two rows) and move the whole inner frame back one whole tile's width.

    Basically it's just the illusion of a huge picture inside the frame, at the time designed for use on a PDA.

    I can write a quick example of this tomorrow probably, possibly something you could even copy over into your own code...if you need it, that is :-)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  9. #9

    Thread Starter
    New Member
    Join Date
    Sep 2008
    Posts
    5

    Re: GPS Maps (IMG, MP) Integration

    it's very interesting smux, I will try to do that... Thanks one more time.

  10. #10
    Member
    Join Date
    Feb 2006
    Posts
    53

    Re: GPS Maps (IMG, MP) Integration

    Very interesting method!!! Can you post a sample? Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.