view src/djol/CoordPickerTool.js @ 19:8332e287d552

fix (click on cospas)
author nickolay
date Wed, 04 Oct 2017 21:05:21 +0300
parents 9c21e656cbec
children
line wrap: on
line source

define (["dojo/_base/declare", "./_OneshotTool", "implab/safe", "dojo/when"] , function(declare, _OneshotTool, safe, when) {
    return declare([_OneshotTool], {
        _map : null,
        _proj : null,
        
        constructor : function(opts) {
            safe.argumentNotNull(opts && opts.map, "opts.map");

            this._map = opts.map;
            this._proj = opts.proj;
        },
        
        invoke : function() {
            var me = this;

            return when(me._map.awaitMapEvent('singleclick'), function(evt){
                if (me._proj) {
                    // тут можно преобразовать проекции
                }
                return evt;
            });
        }
    });
});