View Full Version : Help using the Mappoint control with Javascript

11-15-2006, 05:27 PM

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:

<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<title>Test MapPoint</title>
function initMap()
MappointControl1.NewMap( 1 );
function zoomIn()
function zoomOut()
function getAltitude()
mapForm.altitude.value = MappointControl1.ActiveMap.Altitude;
<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>
<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"/>

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. :D

Mattys Consulting
11-15-2006, 11:25 PM
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 ?

11-16-2006, 08:43 AM
The boss needs it to be a web application for ease of use for the customer.