gsLayer.name = "whatever";
map.addLayer(gsLayer,-1);
addStatList()
private var gsLayer:ArcGISDynamicMapServiceLayer;
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"); }
private function widgetOpenedHandler(event:Event):void { google(); map.addLayer(gsLayer,-1); }
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); }
//Add this to the top with the other private vars private var gsLayer:ArcGISDynamicMapServiceLayer; //This goes in your init or what ever the function is called that is fired by creationComplete gsLayer = new ArcGISDynamicMapServiceLayer("Yor url"); //This goes in your widgetOpenedHandler map.addLayer(gsLayer,-1); //Then on the close do map.removeLayer(gsLayer);
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.