Hi Robert,The good news is that I can compile the project with these code changes without any errors.The bad news is that the layer is not added to the map when I load the Streetview widget.The steps i have taken are as follows:I placed the following line under the import section and above the start of private/public references:private var gsLayer:ArcGISDynamicMapServiceLayer;
The following code is the "addStatList()" function I am using, because the Streetview widget seems to reference this instead of init(): private function addStatList():void
{
ViewerContainer.addEventListener(AppEvent.SET_STATUS, statusSet);
theStatus = "Show Google Street View";
gsLayer = new ArcGISDynamicMapServiceLayer("http://SERVER/ArcGIS/rest/services/WebMercator/Roads/MapServer/0");
}
The OpenHandler is as follows: private function widgetOpenedHandler(event:Event):void
{
google();
map.addLayer(gsLayer,-1);
}
The ClosedHandler is as follows: private function widgetClosedHandler(event:Event):void
{
map.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
CursorManager.removeAllCursors();
map.panEnabled = true;
map.cursorManager.removeCursor(map.cursorManager.currentCursorID);
setMapNavigation(null, null);
map.cursorManager.removeCursor(map.cursorManager.currentCursorID);
map.removeLayer(gsLayer);
}
Not sure what I have done wrong with this.I've also tried the URL as a full service (ie, without the "/0" at the end) and there is no joy here either.Thanks as ever for your help.Brendan