koopjs / featureservice Goto Github PK
View Code? Open in Web Editor NEWGet all features from an Esri Feature Service.
License: Other
Get all features from an Esri Feature Service.
License: Other
The request
module is reeeally large and builds are >1MB. This isn't such a big deal when using with node, but is not so good for browser usage.
I would suggest maybe xhr-request instead.
More info in this thread. https://twitter.com/nickpeihl/status/796806578305253376
I will start working on a PR.
Unmatched URL will cause Cannot read property '0' of null
error.
https://github.com/koopjs/featureservice/blob/master/lib/utils.js#L24
https://github.com/koopjs/featureservice/blob/master/index.js#L284
If I'm reading this right, we use maxRecordCount
as the page size. However, though this is usually 1000 or 2000, customers can set it to anything.
We've got a customer right now whose downloads are failing. They have set maxRecordCount
to 10000. I suspect (though I am not certain) that is the cause.
I think we should do something like:
var size = (layer.maxRecordCount < 2001) ? layer.maxRecordCount : 2000
## Todo
* Expose a stream of feature instead of page chuncks
Removed from README.md and turned into issue
On attempts to page with this item, https://tigerweb.geo.census.gov/arcgis/rest/services/Census2010/Tracts_Blocks/MapServer/2?f=pjson, featureservice should use offsets (advancedQueryCapabilities.supportsPagination = true
, see logic here), but OBJECTIDs ranges are being used instead:
`"request": "https://tigerweb.geo.census.gov/arcgis/rest/services/Census2010/Tracts_Blocks/MapServer/2/query?outSR=4326&where=OBJECTID>=15001+AND+OBJECTID<=16000&f=json&outFields=*&geometry=&returnGeometry=true&returnZ=true&geometryPrecision="
I am trying to use this in an ember-cli app.
First I tried loading it using ember-browserify because, it seems to me, that's the best way to load an npm module into an ember-cli app. When I called pages
, I got "req.setTimeout is not a function". I wonder if I would need to provide browserify options to ember-browserify to make this work? You can see this in this branch: https://github.com/mjuniper/opendata-ember/tree/featureservice-ember-browserify by going to http://localhost:4200/datasets?q= and clicking on a dataset in the table.
Then, I tried loading the browser distribution from /dist. The only way I could figure out how to do that in the context of ember-cli was to copy the file to the vendor directory and then call app.import('vendor/featureservice.min.js');
in ember-cli-build.js which is horrible. In this case, when I call pages
, it makes a request to port 443 even though it is an http url. This request eventually times out. You can see this in this branch: https://github.com/mjuniper/opendata-ember/tree/featureservice-vendor by going to http://localhost:4200/datasets?q= and clicking on a dataset in the table.
I'm willing to help fix it but I'd first like to hear people's thoughts. @chelm, @ngoldman, @dmfenton
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.