Request GET https://www.arcgis.com/sharing/rest/portals/checkurl
GET params:
{
url: https:///rest/services/Hosted/cb_2017_us_state_500k/FeatureServer?f=json
| /* | |
| Example request: http://koop.com/craigslist/washingtondc/apartments/FeatureServer/0/query?where=price>20&f=geojson | |
| Req is the express request object: https://expressjs.com/en/4x/api.html#req | |
| req.params = { | |
| host: 'washingtondc', | |
| id: 'apartments' | |
| } | |
| req.query = { | |
| where: 'price > 20', | |
| f: geojson |
| { | |
| "info": { | |
| "_indexFields": false, | |
| "_indexGeometry": false, | |
| "url": "https:\/\/tigerweb.geo.census.gov\/arcgis\/rest\/services\/Census2010\/Tracts_Blocks\/MapServer", | |
| "_indexGeohash": false, | |
| "itemModified": 1500480948000, | |
| "version": 3, | |
| "itemTitle": "2010 Census Population & Housing Unit Counts", | |
| "type": "Feature Service" |
| { | |
| "_indexFields": false, | |
| "retrieved_at": 1524775095476, | |
| "failedLastImport": false, | |
| "lastImportCompleted": 1524775109941, | |
| "version": 3, | |
| "fullFile": "files\/593b88391b614123890f54a1db8fbf55_0\/full\/593b88391b614123890f54a1db8fbf55_0.txt", | |
| "type": "Feature Service", | |
| "status": "Cached", | |
| "generating": { |
| metadata: { | |
| name: String, // The name of the layer | |
| description: String, // The description of the layer | |
| extent: Array, // valid extent array e.g. [[180,90],[-180,-90]] | |
| displayField: String, // The display field to be used by a client | |
| geometryType: String // REQUIRED if no features are returned with this object Point || MultiPoint || LineString || MultiLineString || Polygon || MultiPolygon | |
| idField: Integer || String, // unique identifier field, | |
| maxRecordCount: Number, // the maximum number of features a provider can return at once | |
| limitExceeded: Boolean, // whether or not the server has limited the features returned | |
| timeInfo: Object // describes the time extent and capabilities of the layer, |
| let geom = {"Polygon_Geometry": ["[-117.10, 34.20],[-117.19, 34.05],[-118.19, 34.20],[-117.10, 34.20]"]} | |
| let json = `[${geom.Polygon_Geometry[0]}]`; | |
| console.log(JSON.parse(json)) |
| function bubbleSort(arr){ | |
| // Get Array length | |
| var len = arr.length; | |
| // Create and outer-loop with a decrementing index i | |
| for (var i = len-1; i>=0; i--){ | |
| // Create and inner-loop with incrementing index j that has a max index i | |
| // So, the first time the innerloop cycles, it will loop a number of times equal to the array length. | |
| // The next cycle it will be one less, and so forth |
| /** | |
| * Performs a binary search on the provided *sorted* list and returns the index of the item if found. If it can't be found it'll return -1. | |
| * | |
| * @param {*[]} sorted (ascending) list Items to search through. | |
| * @param {*} item The item-value to look for. | |
| * @return {Number} The index of the item if found, -1 if not. | |
| */ | |
| function binarySearch(list, searchValue) { | |
| var minIndex = 0; | |
| var maxIndex = list.length - 1; |