Autodesk 15606-011408-9300 Developer Guide - Page 175
Summary of ASP Objects, Components, and Events, Example Code
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 175 highlights
map.htm Example Code (continued) The map is now embedded, the event observers are set up, and the onDigitizedPoint function is in place to update the Lat and Lon boxes with the coordinates from the point the user clicks. The ASP code in poi.asp, which drives the controls in the right-hand frame, sets up the controls and the functions behind them. This is where you will see the SDF Component Toolkit commands. Note the use of the ASP method server.CreateObject throughout the code; for more information about ASP, see "Summary of ASP Objects, Components, and Events" on page 110. poi.asp Example Code Points of Interest
SDF Component Toolkit Applications
|
175
The map is now embedded, the event observers are set up, and the
onDigitizedPoint
function is in place to update the
Lat
and
Lon
boxes
with the coordinates from the point the user clicks. The ASP code in
poi.asp
, which drives the controls in the right-hand frame, sets up the
controls and the functions behind them. This is where you will see the SDF
Component Toolkit commands. Note the use of the ASP method
server.CreateObject
throughout the code; for more information about
ASP, see
“
Summary of ASP Objects, Components, and Events
”
on page 110.
<PARAM NAME="ErrorTarget" VALUE="">
<PARAM NAME="ObjectLinkTarget" VALUE="">
<PARAM NAME="ReportTarget" VALUE="">
<PARAM NAME="URLList" VALUE="Off">
<PARAM NAME="URLListTarget" VALUE="">
<PARAM NAME="AutoLinkLayers" VALUE="">
<PARAM NAME="AutoLinkTarget" VALUE="">
<PARAM NAME="AutoLinkDelay" VALUE="20">
<!-- in actual source, EMBED tag is on a single line -->
<EMBED SRC="http://yourserver.com/maps/poi.mwf?URL=
http://yourserver.com/maps/poi.mwf&Lat=0&Lon=0&MaScale=0
&Width=0&Units=M&ToolBar=On&StatusBar=On&LayersViewWidth=150
&DefaultTarget=&ErrorTarget=&ObjectLinkTarget=&ReportTarget=
&URLList=Off&URLListTarget=&AutoLinkLayers=&AutoLinkTarget=
&AutoLinkDelay=20" NAME="map" WIDTH="100%" HEIGHT="100%">
</OBJECT>
</BODY>
</HTML>
poi.asp
Example Code
<%@ LANGUAGE="JavaScript" %>
<HTML>
<HEAD>
<TITLE>Points of Interest</TITLE>
</HEAD>
<BODY BGCOLOR="#C0C0C0">
<%
// First, set up the variables
var op = Request.Form("op");// Operation being performed, hidden form field
var pointName = "";// Value of Name field on the form
var pointLat = "";// Value of the Lat field on the form
var pointLon = "";// Value of the Lon field on the form
var msgText = "";// Message text to display at bottom of page
var actionOp = "";// Action to perform after successful operation
var zoomToLat = 0.0;// Lat to zoom to, used for Find operation.
var zoomToLon = 0.0;// Lon to zoom to, used for Find operation.
map.htm
Example Code (
continued
)