Merge pull request #5162 from probins/strategy

Improve docs/examples for loadingstrategy
This commit is contained in:
Bart van den Eijnden
2016-05-09 09:43:25 +02:00
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ title: Editable ArcGIS REST Feature Service
shortdesc: Example of using an ArcGIS REST Feature Service in an editing application. shortdesc: Example of using an ArcGIS REST Feature Service in an editing application.
docs: > docs: >
This example loads features from ArcGIS REST Feature Service and allows to add new features or update existing features. This example loads features from ArcGIS REST Feature Service and allows to add new features or update existing features.
tags: "vector, esri, ArcGIS, REST, Feature, Service, bbox, loading, server, edit, updateFeature, addFeature" tags: "vector, esri, ArcGIS, REST, Feature, Service, loading, server, edit, updateFeature, addFeature"
resources: resources:
- https://code.jquery.com/jquery-2.2.3.min.js - https://code.jquery.com/jquery-2.2.3.min.js
--- ---
+2 -2
View File
@@ -1,10 +1,10 @@
--- ---
layout: example.html layout: example.html
title: ArcGIS REST Feature Service title: ArcGIS REST Feature Service
shortdesc: Example of using an ArcGIS REST Feature Service with a BBOX strategy. shortdesc: Example of using an ArcGIS REST Feature Service with a Tile strategy.
docs: > docs: >
This example loads new features from ArcGIS REST Feature Service when the view extent changes. This example loads new features from ArcGIS REST Feature Service when the view extent changes.
tags: "vector, esri, ArcGIS, REST, Feature, Service, bbox, loading, server" tags: "vector, esri, ArcGIS, REST, Feature, Service, loading, server"
resources: resources:
- https://code.jquery.com/jquery-2.2.3.min.js - https://code.jquery.com/jquery-2.2.3.min.js
--- ---
+1 -3
View File
@@ -18,9 +18,7 @@ var vectorSource = new ol.source.Vector({
'outputFormat=application/json&srsname=EPSG:3857&' + 'outputFormat=application/json&srsname=EPSG:3857&' +
'bbox=' + extent.join(',') + ',EPSG:3857'; 'bbox=' + extent.join(',') + ',EPSG:3857';
}, },
strategy: ol.loadingstrategy.tile(ol.tilegrid.createXYZ({ strategy: ol.loadingstrategy.bbox
maxZoom: 19
}))
}); });
+2
View File
@@ -5,6 +5,8 @@ goog.require('ol.TileCoord');
/** /**
* One of `all`, `bbox`, `tile`.
*
* @typedef {function(ol.Extent, number): Array.<ol.Extent>} * @typedef {function(ol.Extent, number): Array.<ol.Extent>}
* @api * @api
*/ */