// Custom interactions and controls window.app = {}; var app = window.app; app.KeyMapControl = function(opt_options) { var options = opt_options || {}; var button = document.createElement('button'); button.innerHTML = options.html; button.addEventListener('click', options.handler, false); button.addEventListener('touchstart', options.handler, false); var element = document.createElement('div'); element.className = options.cls + ' ol-unselectable ol-control'; element.setAttribute("data-qtip", options.tooltip); element.appendChild(button); this.getButton = function() { return button; }; ol.control.Control.call(this, { element: element, target: options.target }); }; ol.inherits(app.KeyMapControl, ol.control.Control); app.KeyMapSelectView = function(opt_options) { this.handleDownEvent = function(evt) { }; this.handleDragEvent = function(evt) { }; this.handleMoveEvent = function(evt) { }; this.handleUpEvent = function(evt) { }; ol.interaction.Pointer.call(this, { handleDownEvent: this.handleDownEvent, handleDragEvent: this.handleDragEvent, handleMoveEvent: this.handleMoveEvent, handleUpEvent: this.handleUpEvent }); }; ol.inherits(app.KeyMapSelectView, ol.interaction.Pointer);