view src/djol/CoordPickerTool.js @ 21:7c22fc01fcec

rewritten ./text/template-compile
author cin
date Thu, 30 Nov 2017 11:01:22 +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;
            });
        }
    });
});