Rename ol.source.RemoteVector to ServerVector

This commit is contained in:
Tom Payne
2014-03-13 20:05:42 +01:00
parent b24e122d4f
commit de4a17b8e2
6 changed files with 12 additions and 12 deletions

View File

@@ -32,11 +32,11 @@
<div class="span4">
<h4 id="title">OSM XML example</h4>
<p id="shortdesc">Example of using the OSM XML source. Vector data is loaded dynamically from a remote server using a tiling strategy.</p>
<p id="shortdesc">Example of using the OSM XML source. Vector data is loaded dynamically from a server using a tiling strategy.</p>
<div id="docs">
<p>See the <a href="vector-osm.js" target="_blank">vector-osm.js source</a> to see how this is done.</p>
</div>
<div id="tags">vector, osm, xml, loading, remote</div>
<div id="tags">vector, osm, xml, loading, server</div>
</div>
<div class="span4 offset4">
<div id="info" class="alert alert-success">

View File

@@ -6,7 +6,7 @@ goog.require('ol.layer.Vector');
goog.require('ol.loading');
goog.require('ol.proj');
goog.require('ol.source.BingMaps');
goog.require('ol.source.RemoteVector');
goog.require('ol.source.ServerVector');
goog.require('ol.style.Circle');
goog.require('ol.style.Fill');
goog.require('ol.style.Stroke');
@@ -88,7 +88,7 @@ var styles = {
};
var epsg3857ToEPSG4326 = ol.proj.getTransform('EPSG:3857', 'EPSG:4326');
var vectorSource = new ol.source.RemoteVector({
var vectorSource = new ol.source.ServerVector({
extentUrlFunction: function(extent, resolution) {
var epsg4326Extent = epsg3857ToEPSG4326(extent, []);
return 'http://overpass-api.de/api/xapi?map?bbox=' +

View File

@@ -905,7 +905,7 @@
*/
/**
* @typedef {Object} olx.source.RemoteVectorOptions
* @typedef {Object} olx.source.ServerVectorOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {ol.Extent|undefined} extent Extent.
* @property {function(ol.Extent, number, ol.proj.Projection): string} extentUrlFunction Extent URL function.

View File

@@ -1 +0,0 @@
@exportSymbol ol.source.RemoteVector

View File

@@ -0,0 +1 @@
@exportSymbol ol.source.ServerVector

View File

@@ -1,6 +1,6 @@
// FIXME cache expiration
goog.provide('ol.source.RemoteVector');
goog.provide('ol.source.ServerVector');
goog.require('ol.extent');
goog.require('ol.source.FormatVector');
@@ -11,9 +11,9 @@ goog.require('ol.structs.RBush');
/**
* @constructor
* @extends {ol.source.FormatVector}
* @param {olx.source.RemoteVectorOptions} options Options.
* @param {olx.source.ServerVectorOptions} options Options.
*/
ol.source.RemoteVector = function(options) {
ol.source.ServerVector = function(options) {
goog.base(this, {
attributions: options.attributions,
@@ -49,13 +49,13 @@ ol.source.RemoteVector = function(options) {
this.loadedFeatures_ = {};
};
goog.inherits(ol.source.RemoteVector, ol.source.FormatVector);
goog.inherits(ol.source.ServerVector, ol.source.FormatVector);
/**
* @inheritDoc
*/
ol.source.RemoteVector.prototype.addFeaturesInternal = function(features) {
ol.source.ServerVector.prototype.addFeaturesInternal = function(features) {
/** @type {Array.<ol.Feature>} */
var notLoadedFeatures = [];
var i, ii;
@@ -74,7 +74,7 @@ ol.source.RemoteVector.prototype.addFeaturesInternal = function(features) {
/**
* @inheritDoc
*/
ol.source.RemoteVector.prototype.loadFeatures =
ol.source.ServerVector.prototype.loadFeatures =
function(extent, resolution, projection) {
var loadedExtents = this.loadedExtents_;
var extentsToLoad = this.loadingFunction_(extent, resolution);