Export and externalize Control.setMap
This commit is contained in:
1
build.py
1
build.py
@@ -309,6 +309,7 @@ def examples_star_json(name, match):
|
||||
'../externs/bingmaps.js',
|
||||
'../externs/bootstrap.js',
|
||||
'../externs/geojson.js',
|
||||
'../externs/oli.js',
|
||||
'../externs/proj4js.js',
|
||||
'../externs/tilejson.js',
|
||||
],
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
"//json.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js"
|
||||
],
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"../build/src/external/externs/types.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js"
|
||||
],
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"//json.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js"
|
||||
],
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"//json.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js"
|
||||
],
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"../build/src/external/externs/types.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js"
|
||||
],
|
||||
|
||||
21
externs/oli.js
Normal file
21
externs/oli.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @externs
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
var oli;
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
oli.control.Control = function() {};
|
||||
|
||||
/**
|
||||
* @param {ol.Map} map Map.
|
||||
* @return {undefined} Undefined.
|
||||
*/
|
||||
oli.control.Control.prototype.setMap = function(map) {};
|
||||
@@ -109,6 +109,13 @@
|
||||
* @property {Element|undefined} target Target.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} ol.control.ControlOptions
|
||||
* @property {Element|undefined} element Element.
|
||||
* @property {ol.Map|undefined} map Map.
|
||||
* @property {Element|undefined} target Target.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} ol.control.DefaultsOptions
|
||||
* @property {boolean|undefined} attribution Attribution.
|
||||
|
||||
2
src/ol/control/control.exports
Normal file
2
src/ol/control/control.exports
Normal file
@@ -0,0 +1,2 @@
|
||||
@exportClass ol.control.Control ol.control.ControlOptions
|
||||
@exportProperty ol.control.Control.prototype.setMap
|
||||
@@ -1,5 +1,4 @@
|
||||
goog.provide('ol.control.Control');
|
||||
goog.provide('ol.control.ControlOptions');
|
||||
|
||||
goog.require('goog.Disposable');
|
||||
goog.require('goog.array');
|
||||
@@ -8,14 +7,6 @@ goog.require('goog.events');
|
||||
goog.require('ol.MapEventType');
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{element: (Element|undefined),
|
||||
* map: (ol.Map|undefined),
|
||||
* target: (Element|undefined)}}
|
||||
*/
|
||||
ol.control.ControlOptions;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* A thing which is painted over the map to provide a means for interaction
|
||||
@@ -23,6 +14,7 @@ ol.control.ControlOptions;
|
||||
*
|
||||
* @constructor
|
||||
* @extends {goog.Disposable}
|
||||
* @implements {oli.control.Control}
|
||||
* @param {ol.control.ControlOptions} options Control options.
|
||||
*/
|
||||
ol.control.Control = function(options) {
|
||||
@@ -85,10 +77,9 @@ ol.control.Control.prototype.handleMapPostrender = goog.nullFunction;
|
||||
|
||||
|
||||
/**
|
||||
* Removes the control from its current map and attaches it to the new map.
|
||||
* Subtypes might also wish set up event handlers to get notified about changes
|
||||
* to the map here.
|
||||
*
|
||||
* Remove the control from its current map and attach it to the new map.
|
||||
* Subclasses may set up event handlers to get notified about changes to
|
||||
* the map here.
|
||||
* @param {ol.Map} map Map.
|
||||
*/
|
||||
ol.control.Control.prototype.setMap = function(map) {
|
||||
|
||||
Reference in New Issue
Block a user