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

Help using the Mappoint control with Javascript

This is a discussion on Help using the Mappoint control with Javascript within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, I have no other option than creating a web application that will use Mappoint 2006 for our program. (It's ...

  1. #1
    dave17 is offline Junior Member White Belt
    Join Date
    Nov 2006
    Posts
    8

    Help using the Mappoint control with Javascript

    Hi,

    I have no other option than creating a web application that will use Mappoint 2006 for our program. (It's not against the license since all of our clients will have licensed versions of Mappoint.) I found a piece of starter code to show how to embed the control into the webbrowser and I figured out how to get some functionality out of the control using Javascript. Here is the code that I have, I've added the buttons at the bottom myself:

    Code:
     
    <html>
    <head>
    <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
    <title>Test MapPoint</title>
    <SCRIPT LANGUAGE="JavaScript"> 
    function initMap()
    {
     MappointControl1.NewMap( 1 );
    }
    function zoomIn()
    {
     MappointControl1.ActiveMap.ZoomIn();
    }
    function zoomOut()
    {
     MappointControl1.ActiveMap.ZoomOut();
    }
    function getAltitude()
    {
     mapForm.altitude.value = MappointControl1.ActiveMap.Altitude;
    }
    </SCRIPT> 
    </head>
    <body >
    <p>Test MapPoint</p>
    <object classid="CLSID:8F78D7FC-BAE4-46A4-A79A-052356AB3DD4" id=MappointControl1 width=60% height=60%>
    <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>
    </object>
    <form name="mapForm">
    <input type="button" value="Zoom in!" onClick="zoomIn();"/>
    <input type="button" value="Zoom out!" onClick="zoomOut();"/>
    <input type="button" value="Get altitude!" onClick="getAltitude();"/>
    <input type="text" id="altitude"/>
    </form>
    <SCRIPT>
    initMap();
    </SCRIPT>
    </body>
    </html>
    So I can do anything as long as I only use the MappointControl object that I have defined in the HTML object tag. What I need to figure out is how to create other Mappoint objects, such as pushpins and locations, or even arrays of pushpins and locations. My guess is that I would have to define every object that I wanted to use with HTML object tag, but I would probably have to know the classids for those classes, if they exist. Even then, I wouldnt know how to create arrays.

    Any help/input would be greatly appreciated.

  2. #2
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: Help using the Mappoint control with Javascript

    Hi. Just wanted to inquire as to why you feel there isn't another option.
    What is it that needs doing that can't be done without a web app?
    What about Terminal Server or even (cool!) GoToMeeting ?

  3. #3
    dave17 is offline Junior Member White Belt
    Join Date
    Nov 2006
    Posts
    8

    Re: Help using the Mappoint control with Javascript

    The boss needs it to be a web application for ease of use for the customer.

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. Re: Keyboard control in mappoint activex control
    By djcapslock in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-10-2005, 11:16 AM
  3. Using MapPoint Control for Web App
    By Attila in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-11-2005, 10:36 AM
  4. MapPoint Control in ASP
    By technohippie in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-22-2004, 05:25 PM
  5. i need the mappoint control 9 please
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 04-22-2004, 10:41 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