hi, I can get the map url from .net into flex now using the advice given on this thread. However I am struggling getting the map to actually display.I know flex has got the correct url because I can display it in an alert box in the init routine : private function init():void
{
//var mapLink:String = Application.application.parameters.MAP;
myMapURL = Application.application.parameters.MAP;
Alert.show(myMapURL, "the url is");
}
I tried passing the url directly in the mxml like so:<esri:Map id="myMap" width="100%" height="100%" mapClick="onMapClick(event)" creationComplete="init()"
openHandCursorVisible="false">
<esri:ArcGISDynamicMapServiceLayer
url="{Application.application.parameters.MAP}">
</esri:ArcGISDynamicMapServiceLayer>
</esri:Map>
but this doesnt work, so I tried adding the layers in action script, I added a call to addMapLayers in the init function above then wrote the function: private function addMapLayers():void
{
//base map layer
dynMaplayer = new ArcGISDynamicMapServiceLayer(myMapURL.toString());
//dynMaplayer.url = myMapURL;
dynMaplayer.id = "baseMap";
dynMaplayer.name = "baseMap";
dynMaplayer.visible = true;
myMap.addLayer(dynMaplayer);
}
Still no joy. Please help - What am I doing wrong (or not doing!!)thanks, Graham