function addLayers()
var urlCollection = map.createObject("MGCollection");
urlCollection.add("Street.mlf");
urlCollection.add("SouthEastCounties.mlf");
urlCollection.add("PropertyBoundaries.mlf");
map.addMapLayers(urlCollection);
}
function testWrite()
{
document.write("This is a test.");
}
</SCRIPT>
</HEAD>
<BODY onLoad = "addLayers()">
<INPUT TYPE="button" VALUE="Add Layers" ONCLICK="addLayers()">
When the button is pushed, the layers are loaded fine. In addition the
testWrite () function is called fine from the onLoad. Is there another
function that I need to call? Any help would be appreciated. Thanks
Hamish Richardson
REIS Inc.
Charleston, SC 29412
"Hamish" <d> wrote in message
news:BB03A06419241AE7...@in.WebX.maYIadrTaRb...
I will try that.
Hamish.
"Ryan Luedey" <rlu...@cgsl.com> wrote in message
news:DDB528854BF9034D...@in.WebX.maYIadrTaRb...
Hamish
function getMap()
{
if (navigator.appName == "Netscape")
return document.map;
else
return window.map;
}
function initObs1()
{
getMap().setMapLoadedObserver(document.obs);
}
function onMapLoaded(map)
{
alert('Executing onMapLoaded')
if(document.displayMapLoadedEvents)
{
alert('Map Loaded\nisBusy: ' + map.isBusy());
}
}
function doAddLayer(layer)
{
var map = getMap();
map.addMapLayer(layer);
}
function addLayers()
var urlCollection = map.createObject("MGCollection");
urlCollection.add("Street.mlf");
urlCollection.add("SouthEastCounties.mlf");
urlCollection.add("PropertyBoundaries.mlf");
map.addMapLayers(urlCollection);
}
</SCRIPT>
</HEAD>
<P ALIGN="Center">
<OBJECT ID="map" WIDTH="640" HEIGHT="480" ALIGN="baseline"
CLASSID="CLSID:62789780-B744-11D0-986B-00609731A21D"
CODEBASE="ftp://ftp.autodesk.com/pub/mapguide/ver5/viewer/en/mgaxctrl.cab#Ve
rsion=5,0,0,0">
<PARAM NAME="URL" VALUE="protoreis.mwf">
<!---
<param name="Lat" value="0">
<param name="Lon" value="0">
<param name="MapScale" value="0">
<param name="MapWidth" value="0">
<param name="Units" value="M">
<param name="ToolBar" value="On">
<param name="StatusBar" value="Off">
<param name="LayersViewWidth" value="150">
<param name="URLListState" value="0">
<param name="AutoLinkDelay" value="20">
--->
<EMBED SRC="reis.mwf" ALIGN="baseline" BORDER="0" WIDTH="600" HEIGHT="300"
NAME="map" TYPE="application/x-mwf">
</OBJECT>
</P>
<SCRIPT LANGUAGE = "JavaScript">
MyMap = getMap();
onMapLoaded(MyMap);
</SCRIPT>
"Hamish" <d> wrote in message
news:CB00FBE8437B2358...@in.WebX.maYIadrTaRb...
I really trying to start taking advantage of the event handlers but it seems
pretty complicated. Most of our users use I.E. instead of Netscape. It seems
though in the section in the MGViewer help under "Setting up the Event
Handler" , even though we will be using the ActiveX Control you still need
to set up a couple of applets that will act as observers. Is it really this
difficult to take advantage of such things as the onMapLoad event.
All we want to do is to be able to only load layers that pertain to a end
user that has logged in with out that user having to click on a button. Is
there any other alternative than the complicated set up specified in the
MGViewer help? We just want to develop for IE. Any advice would be helpful.
Hamish
"Ryan Luedey" <rlu...@cgsl.com> wrote in message
news:3580353A76D1D1BD...@in.WebX.maYIadrTaRb...