Mercurial > pub > ImplabJs
diff src/djol/coordPickerTool.js @ 16:1eeae195b234
Разработка кнопки выбора координат с карт
author | nickolay |
---|---|
date | Tue, 19 Sep 2017 12:34:16 +0300 |
parents | src/djol/CoordPickerTool.js@b85df31b7e0e |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/djol/coordPickerTool.js Tue Sep 19 12:34:16 2017 +0300 @@ -0,0 +1,24 @@ +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.awaitMapEvent('singleclick'), function(evt){ + if (me._proj) { + // тут можно преобразовать проекции + } + return evt; + }); + } + }); +}); \ No newline at end of file