Created
February 11, 2015 16:30
-
-
Save apfister/e0ca0ffd634b732f0189 to your computer and use it in GitHub Desktop.
geoservices - featureservice error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Geoservices = require('geoservices'); | |
var client = new Geoservices(); | |
// console.log(client); | |
var query_params = { | |
f: 'json', | |
returnGeometry: true, | |
where: '1=1', | |
outSR: '4326' | |
}; | |
var params = { | |
catalog: 'http://sampleserver6.arcgisonline.com/arcgis/rest/services', | |
service: 'Census', | |
type: 'MapServer', | |
layer: 3 | |
}; | |
var fs = client.FeatureService( params , function(err, data){ | |
fs.query( query_params, function( err, result ){ | |
if (err) { | |
console.error("ERROR: " + err); | |
} else { | |
console.log("Features: ", result ); | |
} | |
}); | |
}); | |
// client.geocode({ text: "920 SW 3rd Ave, Portland, OR 97201" }, function (err, result) { | |
// if (err) { | |
// console.error("ERROR: " + err); | |
// } else { | |
// console.log("Found it at " + result.locations[0].feature.geometry.y + ", " + result.locations[0].feature.geometry.x); | |
// } | |
// }) |
JerrySievert
commented
Feb 11, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment