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 13

SaveMapAs and SaveAs

This is a discussion on SaveMapAs and SaveAs within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi all, Im using MapPoint Control with C# and I would like to be able to save the maps and ...

  1. #1
    TheJudge is offline Junior Member Yellow Belt
    Join Date
    Mar 2004
    Posts
    15

    SaveMapAs and SaveAs

    Hi all,

    Im using MapPoint Control with C# and I would like to be able to save the maps and direction as a Html file.

    Any idea why it is not allowing me to do it?

    i tried using the following line but that doesn't work unless i save it as a mappoint file (ptm):
    this.axMappointControl1.SaveMapAs("C://route.htm");

    and if i use the following line, nothin is saved!:

    axMappointControl1.ActiveMap.SaveAs("C://route.htm", MapPoint.GeoSaveFormat.geoFormatHTMLMapAndDirectio ns, false);


    Any idea of what i can save the activemap as a html file.

    Im doing this as I would like to be able to print since the PrintOut method is not doing anything either!

    this.axMappointControl1.ActiveMap.PrintOut("C://route.ptt", "MapPoint testing", 2, MapPoint.GeoPrintArea.geoPrintDirections, MapPoint.GeoPrintQuality.geoPrintQualityNormal, MapPoint.GeoPrintOrientation.geoPrintAuto, false, false, false, false);

    the only way to save anything is to load the map into MapPoint 2004 application and from my application i save it using the first line but that is not even allowed.ad you not allowed to add both MapPoint COM controls into a single application (MapPoint 11.0 Object Library (Europe) & MapPoint Control 11.0)

    Any help or idea would be very much appreciated it..

    thank you in advance.

    Regards,
    Kam

  2. #2
    Syd
    Syd is offline Member Yellow Belt
    Join Date
    Aug 2003
    Posts
    42
    As far as I know, the SaveAs method is not available in the MappointControl.

    Also, I'd like to know what this object MapPoint object is when you're using the MapPointcontrol.

    The PrintOut Method is somewhat difficult, but as you can see in MapPoint, if you want to save the map in a file, MapPoint creates a *.prn file for your printer.

    If you want to print out a route, you must check first if a route is calculated.

    I'm creating a Printdialog to get all possibilities.

    greetings,
    Syd

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    what about the PrintOut method?! the whole idea behind saving the map was to print the html file.!

    it's urgent. hope someone has any idea about it.

    Thanks
    Kam

  4. #4
    Syd
    Syd is offline Member Yellow Belt
    Join Date
    Aug 2003
    Posts
    42
    I guess it's difficult then.
    Perhaps you just use the copymap method and work with the clipboard, save it as a jpg, get the path of your picture, create a *.html file and put the picture in the body of this file
    - but perhaps there is an easier way to do so

    Perhaps the savedwebpage object can help you with this problem?

    greetings,
    Syd

  5. #5
    Syd
    Syd is offline Member Yellow Belt
    Join Date
    Aug 2003
    Posts
    42
    I tested it:

    objMap.SavedWebPages.Add "C:\abcdefg", , "ABC test", True, True, False, 500, 500, True, True, True, False

    objMap.SavedWebPages.Item(objMap.SavedWebPages.Cou nt).Save

    - works fine

    greetings
    Syd

  6. #6
    TheJudge is offline Junior Member Yellow Belt
    Join Date
    Mar 2004
    Posts
    15
    that's great... thank you so much. finally i can save my maps and direction in order to print them out..

    im not quite sure if you've tried using PrintOut method to print out maps? if so did it work with u?

    Have a good time..

    Regards,
    Kamal

  7. #7
    Syd
    Syd is offline Member Yellow Belt
    Join Date
    Aug 2003
    Posts
    42
    I did and it works fine! Although I had to make some changes for the pagesetup object to get it right for MP2k4 Europe I made a Printdialog to get all options - although I'm searching for the right Map title...

    Greetings,
    Syd

  8. #8
    TheJudge is offline Junior Member Yellow Belt
    Join Date
    Mar 2004
    Posts
    15
    how did u do it!, it didn't work with me! i've used the line above!!

  9. #9
    TheJudge is offline Junior Member Yellow Belt
    Join Date
    Mar 2004
    Posts
    15
    when i passed null instead of a file name, it worked fine but i have to call the same method more than once in order to print the map and the direction and the route turnbyturn!!

    i wonder if it is possible to set all of these option only once!

  10. #10
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    If you mean by "set all options at once" to get all printareas at once - that's not possible. These are different values within one argument: the printarea.

    The filename argument in the printout method is used for making *.prn files. These files can be read only by your printer.

    I do it this way: I programmed a printdialog to get all the options I need to print the map like I want to. When I hit the "Print"-Button on my dialog, I check all values I set before I call the printout method.

    I know that 10 arguments are quite a lot - but it's also quite easy to set them right.

    Hope this helps you a bit. Perhaps you can explain it a little bit more

    Greetings,
    Syd

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. Mappoint SaveAs Method
    By mmichaels in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 02-16-2004, 11:01 AM
  2. MapPoint Map.SaveAs HTML
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-11-2003, 10:15 AM
  3. Replies: 1
    Last Post: 05-29-2003, 07:51 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