Source: api/StaticImageMapService.js

Retour à la documentation
define([
    'dojo/_base/declare',
    'spw/api/MapService',
    'spw/api/CustomImageService'
],
function(declare, MapService, CustomImageService) {

    /**
     * @class spw.api.StaticImageMapService
     * @classdesc Service du viewer permettant d'afficher une image sur la carte
     * @extends {spw.api.MapService}
     */
    var StaticImageMapService = declare('spw.api.StaticImageMapService', [MapService], /** @lends spw.api.StaticImageMapService.prototype */ {

        /**
         * Crée le layer Esri sur base de la configuration du MapService.
         */
        createMapLayer: function() {
            this.layer = new CustomImageService({
                imageUrl: this.get('url'),
                id: this.get('serviceId'),
                opacity: this.get('alpha') / 100,
                displayLevels: this.displayLevels,
                maxImageHeight: 50,
                maxImageWidth: 100
            });

            this.inherited(arguments);
        }

    });

    return StaticImageMapService;

});