featureservice
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,2 +5,6 @@ # Change Log | ||
## [0.0.3] - 2015-07-28 | ||
### Fixed | ||
* A change made in v0.0.2 broke pagination. Its now fixed and a test for pages was added. | ||
## [0.0.2] - 2015-07-27 | ||
@@ -19,4 +23,5 @@ ### Added | ||
[0.0.3]: https://github.com/chelm/featureservice/ompare/v0.0.2...v0.0.3 | ||
[0.0.2]: https://github.com/chelm/featureservice/ompare/v0.0.1...v0.0.2 | ||
[0.0.1]: https://github.com/chelm/featureservice/releases/tag/v0.0.1 | ||
// A module designed to talk to feature services and get every feature | ||
// this code will expose methods for getting the URL to each page | ||
// var request = require('browser-request') | ||
var queue = require('async').queue | ||
@@ -154,3 +153,3 @@ var http = require('http') | ||
this.featureCount(function (err, count) { | ||
this.featureCount(function (err, json) { | ||
if (err) { | ||
@@ -160,2 +159,4 @@ return callback(err) | ||
var count = json.count | ||
if (count === 0) { | ||
@@ -162,0 +163,0 @@ return callback('Service returned a count of zero') |
{ | ||
"name": "featureservice", | ||
"description": "a node module meant to extract every feature from an Esri geo-service thing", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"author": "Chris Helm", | ||
@@ -38,4 +38,4 @@ "bugs": { | ||
"test": "standard index.js && tape test/*.js | tap-spec", | ||
"build": "browserify -d index.js -s FeatureService -p [minifyify --map featureservice.map.json --output featureservice.map.json] > dist/featureservice.min.js" | ||
"build": "browserify -d index.js -s FeatureService -p [minifyify --map featureservice.map.json --output dist/featureservice.map.json] > dist/featureservice.min.js" | ||
} | ||
} |
@@ -43,2 +43,20 @@ # featureservice | ||
## Browser | ||
A browser ready build of this module is in `dist/featureservice.min.js` and is built via the command `npm run build` | ||
Example | ||
```html | ||
<html> | ||
<script src="dist/featureservice.min.js"></script> | ||
<script> | ||
var service = new FeatureService('http://koop.dc.esri.com/socrata/seattle/2tje-83f6/FeatureServer/0', {}) | ||
service.statistics('id', ['max'], function (err, stats) { | ||
console.log(err, stats) | ||
}) | ||
</script> | ||
</html> | ||
``` | ||
## Todo | ||
@@ -45,0 +63,0 @@ |
@@ -41,2 +41,12 @@ var sinon = require('sinon') | ||
test('builds pages for the service', function (t) { | ||
var url = 'http://maps.indiana.edu/ArcGIS/rest/services/Infrastructure/Railroads_Rail_Crossings_INDOT/MapServer' | ||
var indiana = new FeatureService(url, {}) | ||
indiana.pages(function (err, pages) { | ||
t.equal(err, null) | ||
t.equal(pages.length, 156) | ||
t.end() | ||
}) | ||
}) | ||
test('stub setup', function (t) { | ||
@@ -79,2 +89,1 @@ sinon.stub(service, 'request', function (url, callback) { | ||
}) | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1145523
10
4623
65
6