Add ol.source.KML
This commit is contained in:
@@ -536,6 +536,19 @@
|
|||||||
* @property {Object|undefined} params Additional parameters.
|
* @property {Object|undefined} params Additional parameters.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} olx.source.KMLOptions
|
||||||
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
|
* @property {Document|undefined} doc Document.
|
||||||
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
|
* @property {string|undefined} logo Logo.
|
||||||
|
* @property {Node|undefined| node Node.
|
||||||
|
* @property {ol.proj.ProjectionLike} projection Projection.
|
||||||
|
* @property {ol.proj.ProjectionLike} reprojectTo Re-project to.
|
||||||
|
* @property {string|undefined} text Text.
|
||||||
|
* @property {string|undefined} url URL.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} olx.source.MapQuestOptions
|
* @typedef {Object} olx.source.MapQuestOptions
|
||||||
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
||||||
|
|||||||
1
src/ol/source/kmlsource.exports
Normal file
1
src/ol/source/kmlsource.exports
Normal file
@@ -0,0 +1 @@
|
|||||||
|
@exportSymbol ol.source.KML
|
||||||
31
src/ol/source/kmlsource.js
Normal file
31
src/ol/source/kmlsource.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
goog.provide('ol.source.KML');
|
||||||
|
|
||||||
|
goog.require('ol.format.KML');
|
||||||
|
goog.require('ol.source.VectorFile');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* @extends {ol.source.VectorFile}
|
||||||
|
* @param {olx.source.KMLOptions=} opt_options Options.
|
||||||
|
*/
|
||||||
|
ol.source.KML = function(opt_options) {
|
||||||
|
|
||||||
|
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||||
|
|
||||||
|
goog.base(this, {
|
||||||
|
attributions: options.attributions,
|
||||||
|
doc: options.doc,
|
||||||
|
extent: options.extent,
|
||||||
|
format: new ol.format.KML(),
|
||||||
|
logo: options.logo,
|
||||||
|
node: options.node,
|
||||||
|
projection: options.projection,
|
||||||
|
reprojectTo: options.reprojectTo,
|
||||||
|
text: options.text,
|
||||||
|
url: options.url
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
goog.inherits(ol.source.KML, ol.source.VectorFile);
|
||||||
Reference in New Issue
Block a user