Most of our uses of source extent were cargo cult programming. The source extent was seldom and inconsistently used. Instead, layers can now be configured with an extent, and layer renderers limit rendering (and data requests) to the layer extent. For vector sources, the `getExtent` method returns the extent of currently loaded features (this was the case before and after this change). For tile based sources, we will likely want to allow easy construction of tile grids based on an extent (this is not possible before or after this change, but could be added later).
36 lines
787 B
JavaScript
36 lines
787 B
JavaScript
goog.provide('ol.source.OSMXML');
|
|
|
|
goog.require('ol.format.OSMXML');
|
|
goog.require('ol.source.StaticVector');
|
|
|
|
|
|
|
|
/**
|
|
* @classdesc
|
|
* Static vector source in OSMXML format
|
|
*
|
|
* @constructor
|
|
* @extends {ol.source.StaticVector}
|
|
* @fires ol.source.VectorEvent
|
|
* @param {olx.source.OSMXMLOptions=} opt_options Options.
|
|
* @api
|
|
*/
|
|
ol.source.OSMXML = function(opt_options) {
|
|
|
|
var options = goog.isDef(opt_options) ? opt_options : {};
|
|
|
|
goog.base(this, {
|
|
attributions: options.attributions,
|
|
doc: options.doc,
|
|
format: new ol.format.OSMXML(),
|
|
logo: options.logo,
|
|
node: options.node,
|
|
projection: options.projection,
|
|
reprojectTo: options.reprojectTo,
|
|
text: options.text,
|
|
url: options.url
|
|
});
|
|
|
|
};
|
|
goog.inherits(ol.source.OSMXML, ol.source.StaticVector);
|