2

I am using ArcGIS API for JavaScript 3.19.

I have added a dynamic layer without a base map, without the extent, its working , i can do map activities . But when i added extent in the map while creating , it is showing map, but the moment i started zooming or panning , suddenly map disappears . Totally weird.

 'use strict';
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import routing from './map.routes';
import SwiftMap from '../core/swiftmap';
import config from '../../config/config';


/*@ngInject*/
function mapDirective($rootScope,MapService,MapFactory,$http) {

    return {
        template: require('./mapDirective.html'),
        restrict: 'E',
        transclude: true,
        scope: {
            onmapready: '&'
        },
        link: function(scope, element, attrs) {

             var _extent = this.initialExtent;
           currentMap = new Map("mapDiv",
        {
            logo: false,
            extent: _extent,
            zoom: 13,
            sliderPosition: "bottom-left"
        }); 


            currentMap.on("load",function(){                 
                MapService.setData('map',currentMap);
                MapFactory.setCurrentMap(currentMap);
                MapFactory.createMapTask(currentMap);
                $rootScope.$broadcast('map-ready',currentMap);
            });   
            currentMap.on("layers-add-result", function (evt) {
                console.log(evt);
            });

            dynamicLayer= swiftMap.addDynamicLayer(MapFactory.currentDynamicMapLayer,true,"dynamiclayer1", layerIds,layerDefs);           
            MapService.setData('layer',dynamicLayer);
        }
    };
}


export default  mapDirective;

but when i comment the extent , it is working properly

  • Even i am facing the same issue.. The moment I Pan the map or at time zoom in or out, the image totally disappears!! How to resolve that!! – G.D. Jun 2 '17 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.