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

Can I embed MapPoint ActiveX Ctrl in HTML with JScript/VBScr

This is a discussion on Can I embed MapPoint ActiveX Ctrl in HTML with JScript/VBScr within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, Can I embed MapPoint ActiveX Control in HTML with JScript or VBScript? I am using MS ActiveX Control Pad ...

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

    Can I embed MapPoint ActiveX Ctrl in HTML with JScript/VBScr

    Hi,

    Can I embed MapPoint ActiveX Control in HTML with JScript or VBScript?
    I am using MS ActiveX Control Pad which produces the following HTML code. I have tried the following but I do not know how to initialize the control (the ###### part).

    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE="JavaScript" FOR="window" EVENT="onLoad()">
    <!--
    MappointControl1.NewMap( ###### )

    -->
    </SCRIPT>

    <TITLE>New Page</TITLE>
    </HEAD>

    <BODY>
    <OBJECT ID="MappointControl1" WIDTH=489 HEIGHT=435
    CLASSID="CLSID:8F78D7FC-BAE4-46A4-A79A-052356AB3DD4">
    <PARAM NAME="BorderStyle" VALUE="0">
    <PARAM NAME="MousePointer" VALUE="0">
    <PARAM NAME="TabStop" VALUE="0">
    <PARAM NAME="Appearance" VALUE="1">
    <PARAM NAME="PaneState" VALUE="3">
    <PARAM NAME="UnitsOfMeasure" VALUE="1">
    </OBJECT>
    </BODY>
    </HTML>

    What's the JScript or VBScript equivalent of the Visual Basic following code ?
    MappointControl1.NewMap geoMapNorthAmerica
    or
    MappointControl1.OpenMap "Clients.ptm"

    tia
    Nikos Georgopoulos

  2. #2
    1.21Gigawatts is offline Junior Member White Belt
    Join Date
    Apr 2005
    Posts
    8
    Did you ever get this work? I'm trying to load the activex control in a web page, but Internet Explorer only shows an empty box and never loads the control.

  3. #3
    vozzie is offline Junior Member White Belt
    Join Date
    Nov 2005
    Posts
    1

    leme give ya a litl elp

    Hy,

    I noticed that the window.load event is not triggered when you embed a mappoint control into a html page. But with setTimeout() i could make it work. See next,

    Code:
    <html>
    	<head>
    		<title>Test MapPoint</title>
    	</head>
    	<body>
    		<object classid="CLSID&#58;8F78D7FC-BAE4-46A4-A79A-052356AB3DD4" id="objMapPoint" width=192 height=192>
    			<param name=BorderStyle value=0>
    			<param name=MousePointer value=0>
    			<param name=TabStop value=-1>
    			<param name=Appearance value=1>
    			<param name=PaneState value=3>
    			<param name=UnitsOfMeasure value=0>
    			Could not load mappoint control!
    		</object>
    		<script language="VBScript">
    Sub Start&#40;&#41;
    	Dim Map
    	' 1 = US, 2 = Europe
    	Set Map = objMapPoint.NewMap&#40;2&#41;
    End Sub
    
    SetTimeout "Start&#40;&#41;", 2000
    		</script>
    	</body>
    </html>
    This should work,...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HTML, activeX and Javascript - Union method problem
    By mcjwb in forum MapPoint Desktop Discussion
    Replies: 14
    Last Post: 06-18-2005, 09:56 AM
  2. Ctrl+T (Data -> Territories...) programatically MapPoint
    By SheepWorrier in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-12-2005, 05:34 PM
  3. MapPoint Map.SaveAs HTML
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-11-2003, 10:15 AM
  4. Replies: 1
    Last Post: 05-29-2003, 07:51 PM
  5. Key press Event of Mappoint Ctrl in VC++
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-28-2003, 11:45 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 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 84 85 86 87 88 89 90 91 92 93 94 95 96