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

MapPoint hangs when saving map as HTML

This is a discussion on MapPoint hangs when saving map as HTML within the MapPoint Desktop Discussion forums, part of the Map Forums category; I'm using the MapPoint Control, and I needed to save a map as HTML. Because the Control does not sponsor ...

  1. #1
    tfmiltz is offline Member Green Belt
    Join Date
    Feb 2005
    Posts
    52

    MapPoint hangs when saving map as HTML

    I'm using the MapPoint Control, and I needed to save a map as HTML.
    Because the Control does not sponsor support for geoFormatHTMLMap using the .saveas method, I read that the only way to do this is to use the control.saveas to save the map as a .ptm, and then instantiate MapPoint (second instance if you watch processes), and use:

    oRootApp.ActiveMap.SaveAs sFileNameAndPath, geoFormatHTMLMap

    This indeed does save the map an html, and the corresponding graphic, however, the new second instance of mappoint that is started never dies.

    Upon form load with the control, an instance of MapPoint starts.
    On the form, I sponsor functionality to save map as html.
    So, the form is still loaded, one instance of mappoint running, and I go to instantiate the second instance to gain access to teh .SaveAs that allows for geoFormatHTMLMap, map saves, but never returns.

    Win NT 5.0 > 5.x happens on all versions of OS that I've witnessed.

    Anyone else have a clue on this ?

    I did indeed read the example provided in this forum for saving to html, and for the most part have learned that the control lacks a great deal of functionality of the app object automation approach, and unfortunately you can not embed the app through automation as transparantly as the control.

    Ideas ?

    Tim Miltz

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

    In fact the map is saved as a picture, and a small html document is generated to show the picture with a browser. So what you easy can do is copy the map to clipboard, save the clipboard as a gif, bmp, or wathever and generate a small html file yourself. It will probably go mutch faster also.

  3. #3
    tfmiltz is offline Member Green Belt
    Join Date
    Feb 2005
    Posts
    52

    MapPoint Control

    Interesting idea there.

    I wasn't aware the mappoint Control sponsored a means to copy the map to the clipboard.

    I realized what causes the hang, if the control instance has the map currently 'open', and I go to instantiate the map point application object, second instance hangs, if I 'close' the map that's displayed with the mappoint control, and THEN instantiate MO (some humor for ESRI people there), it doesn't hang, but, I end up flashing the screen blank for a split second during save.

    Using the control explicitly would be terrific, what's odd is I see MapPoint Application Object HAS a .UserControl property that can be set to True, yet, I don't get the stripped down control when I set this, so I just use the control explicitly, however, as stated above, no means to save to 'other than' a .ptm file with the control.

    I like the clipboard idea, however, I'm not sure what means exist to push the control's map to the clipboard.

    Thoughts ?

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

    You can use the CopyMap method to copy it to clipboard. After that you save it to a GIF or whatever format file you like, and you create a HTML file to display it. This is excacly what mappoint does saving to html, but it is better you control all yourself (meaning I like to have control myself

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Mappoint on html page ?
    By kristijan in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 05-24-2006, 07:00 AM
  2. Can I embed MapPoint ActiveX Ctrl in HTML with JScript/VBScr
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 01-16-2006, 03:01 AM
  3. Problem saving map to html
    By MarkStanley in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-22-2005, 02:24 PM
  4. MapPoint Map.SaveAs HTML
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-11-2003, 09:15 AM
  5. MapPoint control hangs while opening a map
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 10-24-2002, 11: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