Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

featureserver

koopjs10.3kApache-2.05.0.0

An open source implementation of the GeoServices specification

featureserver, geoservices, geojson, sql

readme

FeatureServer

DEPRECATED - now migrated to a package in the Koop monorepo. Update any npm usage to @koopjs/featureserver.

No Maintenance Intended npm travis Greenkeeper badge

An open source implementation of the GeoServices specification

Usage

This is meant to be used as a plugin to Express

Example server

const express = require('express')
const app = express() // set up a basic express server
const FeatureServer = require('featureserver')
const cache = require('cache')

// We only need one handler because FeatureServer.route is going to do all the work
const handler = (req, res) => {
  cache.get(/* some geojson */, (err, data) => {
    if (err) res.status(500).json({error: err.message})
    else FeatureServer.route(req, res, data)
  })
}

// Sets up all of the handled routes to support `GET` and `POST`
const routes = ['/FeatureServer', '/FeatureServer/layers', '/FeatureServer/:layer', '/FeatureServer/:layer/:method']

routes.forEach(route => {
  app.route(route)
  .get(handler)
  .post(handler)
})

Setting defaults at runtime

FeatureServer allows several defaults to be set at runtime via Express's app.locals method. Specifically, you will need to set:

app.locals.config = {
  featureServer: {
    // define default here
  }
}

If you are using FeatureServer as part of a Koop instance, the equivalent of Express's app.locals is koop.server.locals.

The follow properties can be set at runtime with the noted method:

app.locals.config = {
  featureServer: {
    currentVersion: 11.01, // defaults to 10.51
    fullVersion: '11.0.1', // defaults to '10.5.1'
    serviceDescription: 'default service description',
    description: 'default layer description'
  }
}

API

FeatureServer.route

Pass in an incoming request object, an outgoing response object, a geojson object, and options and this function will route and return a geoservices compliant response

  • Supports: '/FeatureServer', '/FeatureServer/layers', '/FeatureServer/:layer', '/FeatureServer/:layer/:method'
    • Note: only query, info, and generateRenderer are supported methods at this time.
FeatureServer.route(req, res, data, options)
  • data is either a geojson object extended with some additional properties or an object with a layers property which an array of extended geojson objects. These properties are optional and can be used to provide more specific metadata or to shortcut the built in filtering mechanism.

e.g.

{
  type: 'FeatureCollection' // Static
  features: Array, // GeoJSON features
  statistics: Object, // pass statistics to an outStatistics request to or else they will be calculated from geojson features passed in
  metadata: {
    id: number, // The unique layer id.  If supplied for one layer, you should supply for all layers to avoid multiple layers having the same id.
    name: String, // The name of the layer
    description: String, // The description of the layer
    copyrightText: String, // The copyright text (layer attribution text)
    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: 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,
    transform: Object, // describes a quantization transformation
    renderer: Object, // provider can over-ride default symbology of FeatureServer output with a renderer object. See https://developers.arcgis.com/web-map-specification/objects/simpleRenderer, for object specification.
    defaultVisibility: boolean, // The default visibility of this layer
    minScale: number, // The minScale value for this layer
    maxScale: number, // The maxScale value for this layer
    fields: [
     { // Subkeys are optional
       name: String,
       type: String, // 'Date' || 'Double' || 'Integer' || 'String'
       alias: String, // how should clients display this field name,
     }
    ]
  },
  capabilities: {
    quantization: Boolean // True if the provider supports quantization
  },
  filtersApplied: {
    all: Boolean // true if all post processing should be skipped
    geometry: Boolean, // true if a geometric filter has already been applied to the data
    where: Boolean, // true if a sql-like where filter has already been applied to the data
    offset: Boolean // true if the result offset has already been applied to the data,
    limit: Boolean // true if the result count has already been limited,
    projection: Boolean // true if the result data has already been projected
  }
  count: Number // pass count if the number of features in a query has been pre-calculated
}

or

{
  layers: [
    {
      type: 'FeatureCollection'
      ...
    },
    {
      type: 'FeatureCollection'
      ...
    }
]
  • options is an object that dictates method actions. See FeatureServer.query and FeatureServer.generateRenderer for more details.

FeatureServer.query

Pass in geojson and options (a valid geoservices query object), and the function will perform the query and return a valid geoservices query object. The in addition to input statistics: {}, following is an example of all query options that can be passed into the query route: '/FeatureServer/:layer/query'

e.g.

const options = {
  where: `1=1`,
  objectIds: '1,2,3',
  geometry: {
    xmin: -110, ymin: 30, xmax: -106, ymax: 50,
    spatialReference: { wkid: 4326 },
  },
  geometryType: 'esriGeometryEnvelope',
  spatialRel: 'esriSpatialRelContains',
  outFields: '*',
  returnGeometry: true,
  outSR: 102100, // output spatial reference
  returnIdsOnly: true,
  returnCountOnly: true,
  orderByFields: 'Full/Part_COUNT DESC',
  groupByFieldsForStatistics: 'Full/Part',
  outStatistics: {
      statisticType: 'count',
      onStatisticField: '<field>',
      outStatisticFieldName: 'name'
  },
  returnDistinctValues: true,
  resultOffset: 0,
  resultRecordCount: 0,
  f: 'pjson'
}

FeatureServer.query(geojson, options)

FeatureServer.serverInfo

Generate version 10.51 Geoservices server info

const server = {
  description: String // Describes the collection of layers below,
  copyrightText: String // Optional copyright text
  maxRecordCount: Number // the maximum number of features a provider can return at once,
  hasStaticData: Boolean // whether or not the server contains any data that is not changing
  hasAttachments: Boolean // whether or not the server contains any attachments for this layer
  layers: [{ // A collection of all the layers managed by the server
    type: 'FeatureCollection',
    metadata: {
      id: number, // The unique layer id.  If supplied for one layer, you should supply for all layers to avoid multiple layers having the same id.
      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
      idField: String, // unique identifier field,
      geometryType: String, // REQUIRED if no features are returned with this object Point || MultiPoint || LineString || MultiLineString || Polygon || MultiPolygon
      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
      renderer: Object, // provider can over-ride default symbology of FeatureServer output with a renderer object. See https://developers.arcgis.com/web-map-specification/objects/simpleRenderer, for object specification.
      defaultVisibility: boolean, // The default visibility of this layer
      minScale: number, // The minScale value for this layer
      maxScale: number // The maxScale value for this layer
    }
    features: [// If all the metadata provided above is provided features are optional.
      {
        type: 'Feature',
        geometry: {
          type: 'Point',
          coordinates: [125.6, 10.1]
        },
        properties: {
          name: 'Dinagat Islands'
        }
      }]
    }
  }],
  tables: [{ // A collection of all the tables managed by the server
    type: 'FeatureCollection',
    metadata: {
      // see layer metadata
    }
  }],
  relationships: [{ // A collection of all relationships manged by the server
    id: number, // The unique relationship id.
    name: String, // The name of the relationship
  }]
}

FeatureServer.serverInfo(server)

FeatureServer.layerInfo

Generate version 10.51 Geoservices information about a single layer

FeatureServer.layerInfo(geojson, options)

Note that the layer info is modified with properties metadata and capabilites found at the top-level of the GeoJSON object.

GeoJSON property Layer info result
metadata.id overrides default
metadata.name overrides default
metadata.description overrides default
metadata.geometryType overrides value determined from data
metadata.extent overrides value determined from data
metadata.timeInfo overrides default
metadata.maxRecordCount overrides default (2000)
metadata.displayField overrides default (OBJECTID)
metadata.objectIdField overrides default (OBJECTID)
metadata.hasStaticData overrides default (false)
metadata.hasAttachments overrides default (false)
metadata.renderer overrides default
metadata.defaultVisibility overrides default
metadata.minScale overrides default
metadata.maxScale overrides default
metadata.relationships overrides default
capabilities.extract when set to true, Extract added to capabilites (e.g., capabilities: "Query,Extract")
capabilities.quantization when set to true, supportsCoordinatesQuantization: true
metadata.relationships

This defined the server managed relationships for the layer

e.g.

const metadata = {
  //...
  relationships: [{ // A collection of all relationships manged by the server
    id: number, // The unique relationship id.
    name: String, // The name of the relationship
    relatedTableId: number, // Id of the layer/table related records are found
    cardinality: String, // esriRelCardinalityOneToMany | esriRelCardinalityManyToMany
    role: String, // esriRelRoleOrigin | esriRelRoleDestination
    keyField: String, // key field name in the related Table 
    composite: Boolean // likely to false
  }]
  //...
}

FeatureServer.layers

Generate version 10.51 Geoservices information about one or many layers

Can pass a single geojson object or an array of geojson objects

FeatureServer.layers(geojson, options)

FeatureServer.generateRenderer

Pass in geojson and options, and the function will return a valid generateRenderer object. Two classificationDef classification types are supported, classBreaksDef and uniqueValueDef.

classBreaksDef is used to classify numeric data based on a number of breaks and a statistical method. Features can also be normalized before being classified. uniqueValueDef is used to classify data based on a unique field(s). If classification breaks are not supplied through in statistics, they will be generated using classificationDef options. The output is a generateRenderer object.

classBreaksDef

In addition to class breaks as input statistics: [], the following is an example of all classBreaksDef options that can be passed into the generateRenderer route: '/FeatureServer/:layer/generateRenderer'

e.g.

const options = {
 *'classificationDef': {
   *'type': 'classBreaksDef',
   *'classificationField': '<field1>',
   *'classificationMethod': 'esriClassifyEqualInterval' | 'esriClassifyNaturalBreaks' | 'esriClassifyQuantile' | 'esriClassifyStandardDeviation',
   *'breakCount': 9,
    'normalizationType': 'esriNormalizeByField' | 'esriNormalizeByLog' | 'esriNormalizeByPercentOfTotal',
    'normalizationField': '<field2>' // mandatory if 'normalizationType' === 'esriNormalizeByField'
    'baseSymbol': {
      'type': 'esriSMS',
      'style': 'esriSMSCircle',
      'width': 2
    },
    'colorRamp': {
      'type': 'algorithmic',
      'fromColor': [115,76,0,255],
      'toColor': [255,25,86,255],
      'algorithm': 'esriHSVAlgorithm'
    }
  },
  'where': '<field2> > 39'
}

FeatureServer.generateRender(geojson, options)

*required

Output:

{
  type: 'classBreaks',
  field: '<field1>',
  classificationMethod: 'esriClassifyEqualInterval',
  minValue: 0,
  classBreakInfos: [
    {
      classMinValue: 0,
      classMaxValue: 5,
      label: '0-5',
      description: '',
      symbol: {
        type: 'esriSMS',
        style: 'esriSMSCircle',
        width: 2,
        color: [115, 76, 0]
      }
    },
    {
      classMinValue: 6,
      classMaxValue: 11,
      label: '6-11',
      description: '',
      symbol: {
        type: 'esriSMS',
        style: 'esriSMSCircle',
        width: 2,
        color: [156, 67, 0]
      }
    },
    ...
  ]
}
uniqueValueDef

The following is an example of all uniqueValueDef options that can be passed into the generateRenderer route: '/FeatureServer/:layer/generateRenderer'

e.g.

const options = {
 *'classificationDef': {
   *'type': 'uniqueValueDef',
   *'uniqueValueFields': ['Genus', '<field2>', '<field3>'],
   *'fieldDelimiter': ', '
    'baseSymbol': {
      'type': 'esriSMS',
      'style': 'esriSMSCircle',
      'width': 2
    },
    'colorRamp': {
      'type': 'algorithmic',
      'fromColor': [115,76,0,255],
      'toColor': [255,25,86,255],
      'algorithm': 'esriHSVAlgorithm'
    }
  },
  'where': 'latitude > 39'
}

FeatureServer.generateRender(geojson, options)

*required

Output:

{
  type: 'uniqueValue',
  field1: 'Genus',
  field2: '',
  field3: '',
  fieldDelimiter: ', ',
  defaultSymbol: {},
  defaultLabel: '',
  uniqueValueInfos: [
    {
      value: 'MAGNOLIA',
      count: 5908,
      label: 'MAGNOLIA',
      description: '',
      symbol: {
        type: 'esriSMS',
        style: 'esriSMSCircle',
        width: 2,
        color: [115, 76, 0]
         }
    },
    {
      value: 'QUERCUS',
      count: 12105,
      label: 'QUERCUS',
      description: '',
      symbol: {
        type: 'esriSMS',
        style: 'esriSMSCircle',
        width: 2,
        color: [116, 76, 0]
        }
   },
   ...
  ]

FeatureServer.authenticate

Pass in an outgoing response object and an authentication success object and this function will route and return a formatted authentication success response.

FeatureServer.authenticate(res, auth, ssl = false)
  • auth is the result of a successful authentication attempt that returns a token and expiration time
  • ssl is a boolean flag indicating if token should always be passed back via HTTPS. Defaults to false

e.g.,

const auth = {
  "token":"elS39KU4bMmZQgMXDuswgA14vavIp4mfpiqcWSr0qM6q4dFguTnnHddWqbpK5Mc3HsCN8XghlwawUUYApOOcxKNyg_9WqTofChJXxxD058_rL1HZkM5PDhUOh9YYQn1K",
  "expires":1524508236322
}

FeatureServer.authenticate(res, auth)

{
  "token":"elS39KU4bMmZQgMXDuswgA14vavIp4mfpiqcWSr0qM6q4dFguTnnHddWqbpK5Mc3HsCN8XghlwawUUYApOOcxKNyg_9WqTofChJXxxD058_rL1HZkM5PDhUOh9YYQn1K",
  "expires":1524508236322,
  ssl: false
}

FeatureServer.error.authorize

Pass in an outgoing response object and this function will route and return a formattted authorization error.

FeatureServer.error.authorize(res)

{
  "error": {
    "code": 499,
    "message": "Token Required",
    "details": []
  }
}

FeatureServer.error.authenticate

Pass in an outgoing response object and this function will route and return a formatted authentication error.

FeatureServer.error.authenticate(res)

{
  "error": {
    "code": 400,
    "message": "Unable to generate token.",
    "details": ["Invalid username or password."]
  }
}

Unreleased

FeatureServer.queryRelatedRecords

Pass in geojson and options, and the function will return a valid queryRelatedRecords object. Required attributes within options are objectIds and relationshipId.

The geojson should be in the special FeatureCollection of FeatureCollections format to show the relationship between requested Features within the layer/table and the referenced relatinoship's features. e.g.

  const geojson = {
    "type": "FeatureCollection",
    "features": [ // Array of FeatureCollections by objectId with the related records as features
      {
        "type": "FeatureCollection",
        "properties": {
          "OBJECTID": 37
        },
        "features": [
          {
            "type": "Feature",
            "geometry": {...},
            "properties": {...}
          }
        ]
      } 
    ]
  }

  const options = {
    objectIds: "37, 462", // comma separated string of object ids within the layer to get related records 
    relationshipId: 4, // relationship Id of the server manged relationship of the layer, see FeatureServer.layerInfo
  }

FeatureServer.queryRelatedRecords(geojson, options)

Output:

{
  "geometryType": "esriGeometryPolygon",
  "spatialReference": {
    "wkid": 4267
  },
  "fields": [
    {
      "name": "OBJECTID", 
      "type": "esriFieldTypeOID", 
      "alias": "OBJECTID"
    }, 
    {
      "name": "FIELD1", 
      "type": "esriFieldTypeString", 
      "alias": "FIELD1", 
      "length": 25
    }
  ],
  "relatedRecordGroups": [
    {
      "objectId": 37,
      "relatedRecords": [
        {
          "attributes": {
            "OBJECTID": 5540,
            "FIELD1": "1000147595"
          },
          "geometry": {...}
        }
      ]
    }
  ]
}

changelog

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

[5.0.0] - 02-2-2023

Added

  • Add support for returnDistinctValues

Changed

  • No more support for Node 10, 12

[4.1.1] - 11-04-2022

Fixed

  • Allow field definitions to set editable and nullable properties

4.1.0 - 09-15-2022

Added

  • Set hasZ from metadata setting when present

4.0.2 - 09-14-2022

Fixed

  • geojson validation security vulnerablity
  • fix ids in layers metadata
  • fix params passed to QueryFields.create

4.0.1 - 08-05-2022

Changed

  • bump winnow version

4.0.0 - 06-14-2022

Added

  • override default currentVersion and fullVersion via app.locals.config.featureServer
  • override default service-description and layer-description via app.locals.config.featureServer

Changed

  • function signature on the restInfo method

    [3.5.1] - 06-01-2022

    Changed

  • bump winnow version
  • refactor "fields" array generation

3.5.0 - 04-25-2022

Added

  • Add support for overrided default value for copyrightText

3.4.0 - 03-28-2022

Added

  • Add support for overriding default value for supportsPagination

3.3.4 - 03-25-2022

Changed

  • Refactor design pattern for layer metadata

3.3.3 - 03-23-2022

Fixed

  • Server info handler was not properly assigned

3.3.2 - 03-11-2022

Fixed

  • Ensure outSR is used when returnExtentOnly=true and extent not precalculated

Changed

  • Refactor the query handler

3.3.1 - 02-24-2022

Fixed

  • support for returnExtentOnly

3.3.0 - 02-16-2022

Added

  • support for queryRelatedRecords

3.2.1 - 01-20-2022

Fixed

  • templates pulled from metadata for JSAPI 4.x support
  • OBJECTID not forced to Integer if it is a true string (GUID)

3.2.0 - 11-30-2021

Added

  • Support for multipoint

Fixed

  • Table ID numbering

3.1.0 - 09-28-2021

Added

  • Ability to specify the editable property for each field via the metadata object

3.0.1 - 09-01-2021

Changed

  • Added ability to specify capabilities the feature service would like to handle

3.0.0 - 02-18-2021

Changed

  • End support for Node < 10; remove buble compile step

Fixed

  • Allow other properties in spatialReference object

[2.25.2] - 12-18-2020

Fixed

  • Properly set spatial reference values in service, layer, and query info when source data is not WGS84

2.25.1 - 12-14-2020

Changed

  • Bumped Winnow version for patch

2.25.0 - 12-14-2020

Changed

  • Bumped Winnow version - better support for input/output CRSs

2.24.1 - 09-10-2020

Changed

  • Bumped Winnow version

2.24.0 - 09-08-2020

Changed

  • Bumped Winnow version

2.23.0 - 05-13-2020

Added

  • Added Multi versions of all geojson shapes so they will be recognized and translated to esri geometries

2.22.1 - 04-14-2020

Changed

  • Bumped Winnow version

2.22.0 - 01-13-2020

Added

  • ability to override id, defaultVisibility, minScale, and maxScale in layer info via metadata object

2.21.2 - 10-31-2019

Fixed

  • Ensure ObjectID field is moved to being of response fields array
  • Pass domain and nullable properties into response if provided

2.21.1 - 10-04-2019

Fixed

  • Correct packaging

2.21.0 - 09-27-2019

Added

  • Support for provider to set renderer; geojson.metadata.render

2.20.0 - 07-02-2019

Added

  • Support for returnExtentOnly

2.19.0 - 06-27-2019

Added

  • Support for info routes with trailing slashes

2.18.0 - 05-29-2019

Added

  • Support for /FeatureServer/info requests

2.17.2 - 05-22-2019

Fixed

  • returnIdsOnly=true query requests has objectIdFieldName property rather than objectIdField

2.17.1 - 04-30-2019

Added

  • Colorized warnings

Changed

  • Condensed GeoJSON warnings
  • Provide a more descriptive unassigned idField warning

2.17.0 - 04-10-2019

Added

  • Additional layer-info route handling for FeatureServer/:layerId/info

2.16.4 - 12-27-2018

Fixed

  • Before warning of discrepancies between metadata fields array and feature properties, compare name and alias to feature property keys.
  • Remove exceededTransferLimit check specific to maxRecordCount which can break paging functionality of clients

2.16.3 - 11-28-2018

Changed

  • Removed workaround for adding and OBJECTID field even when metadata idField is set

2.16.2 - 10-19-2018

Changed

  • Bump Winnow to 1.16.4

Fixed

  • Add resultRecordCount to the limit setting hierarchy

2.16.1 - 10-03-2018

Fixed

  • package not pointed to dist/index.js

2.16.0 - 09-17-2018

Added

  • Support addition of "Extract" to layer info capabilities if provider's geojson includes { capabilities: { extract: true } }

2.15.2 - 09-10-2018

Changed

  • Supress various warnings when NODE_ENV !== 'production' or KOOP_WARNINGS !== 'suppress'

2.15.1 - 06-06-2018

Added

  • Add warnings for invalid GeoJSON when NODE_ENV !== 'production'

2.15.0 - 05-30-2018

Fixed

  • Authentication and authorization error messages now properly handled if request has callback query parameter

Added

  • Helper function to handle all responses, with or without callback query parameter
  • fullVersion: "10.5.1" to info responses
  • 404 handling of urls that don't include /FeatureServer

2.14.1 - 05-22-2018

Fixed

  • Version bump due to NPM's inability to resolve last publish

2.14.0 - 05-22-2018

Added

  • Add response handlers for authentication success and authentication/authorization errors

2.13.0 - 05-10-2018

Added

  • Add parameter to the rest/info handler and use the argument to supplement/override of the templated JSON response

2.12.1 - 05-03-2018

Fixed

  • Bump version, 2.12.0 was npm published without a compile

2.12.0 - 05-03-2018

Added

  • support the /rest/info route
  • warnings when fields set in provider's metadata don't match name/type of fields found in feature properties
  • support for setting the length of string and date fields in the fields array of a provider's metadata , e.g [{ name: 'Title', type: 'String', length: 50}]
  • support for additional ESRI types when setting fields in provider metadata

2.11.1 - 04-18-2018

Fixed

  • default to templated value of display field if not provided in metadata and an empty fields array

Added

  • if request includes returnGeometry=false and outSR=<EPSG>, delete the outSR param since no geometry will be present to reproject

2.11.0 - 04-17-2018

Added

  • provider attributes referenced by metadata idField are maintained as separate field in addition to OBJECTID when creating ESRI json
  • warnings when a provider's idField is not set or references non- or out-of-range integer values
  • warning when a provider's idField is a mixed-case version of 'OBJECTID'
  • Bump to winnow 1.14.0

Fixed

  • changed default value of hasStaticData to false

2.10.2 - 04-10-2018

Fixed

  • set Content-Type: application/javascript when response is wrapped in callback (JSONP)

2.10.1 - 04-06-2018

Fixed

  • on layer info responses, ensure fields array objects have properties name, type, alias, defaultValue: null, domain: null, editable: false, nullable: false and sqlType: "sqlTypeOther"
  • on layer info responses, ensure that all fields array objects of type String and Date have a length property with values 128 and 36 respectfully
  • on layer info responses, ensure that the first element of fields array in the response is the object with name: 'OBJECTID'
  • on query responses, ensure that all fields array objects have properties name, type, alias, defaultValue: null, domain: null, and sqlType: "sqlTypeOther"
  • on query responses, ensure that the first element of fields array in the response is the object with name: 'OBJECTID'

Added

  • winnow version bump to 1.13.0

2.10.0 - 03-08-2018

Added

  • filtersApplied.limit for already applied limits

2.9.3 - 01-08-2018

Fixed

  • Send 400 on unhandled request method

2.9.2 - 12-28-2017

Fixed

  • logic for setting layer type to table
  • exception when count is 0 and no features are provided

2.9.1 - 12-07-2017

Fixed

  • Position of capabilities
  • version to support quantization

2.9.0 - 12-07-2017

Added

  • Support for passing through quantization capability

2.8.0 - 12-06-2017

Added

  • Support translate and transform quantization metadata

2.7.0 - 11-20-2017

Added

  • filtersApplied.all skips all post processing

2.6.1 - 11-07-2017

Fixed

  • Set spatial reference correctly even when projection is already applied

2.6.0 - 11-07-2017

Added

  • filtersApplied.projection in metadata

2.5.0 10-23-2017

Added

  • filtersApplied.offset in metadata

2.4.6 10-05-2017

Fixed

  • Server info works when metadata.name is undefined

2.4.5 10-05-2017

Changed

  • set exceededTransferLimit = true when the number of features returned is limited by the maxRecordCount

Fixed

  • layer info for multiple layers works

2.4.4 09-21-17

Fixed

  • Limit to max record count

2.4.3 08-23-2017

Fixed

  • Don't throw an exception when response includes only tables
  • Allow geometryType to be passed in for layer responses

2.4.2 08-22-2017

Fixed

  • check isNaN instead of falsy for extent validity

2.4.1 08-22-2017

Fixed

  • Don't bomb out /FeatureServer calls when metadata with no extent is passed in

2.4.0 08-04-2017

Added

  • Support for generateRenderer

2.3.12 07-18-2017

Fixed

  • Query returns correct fields when outFields specified

2.3.11 - 2017-07-08

Fixed

  • ObjectID Fields set to esriFieldTypeOID

2.3.10 - 2017-07-07

Fixed

  • Added package details from 2.3.9

2.3.9 - 2017-07-07

Fixed

  • Import function error in dist

2.3.8 - 2017-07-07

Fixed

  • Save id property when rendering layer

    Changed

  • Reorganize templates.js into individual render functions
  • Renamed renderStatistics to renderStats for render function consistency

2.3.7 - 2017-07-06

Fixed

  • supportsPagination => true

2.3.6 - 2017-06-28

Fixed

  • fixed out statistics when statistics are passed in

2.3.5 - 2017-06-28

Fixed

  • Date fields are properly converted while using statistics

2.3.4 - 2017-06-26

Fixed

  • Date fields show up in webmap viewer

2.3.3 - 2017-06-20

Fixed

  • Use indexOf instead of includes to compile to es5

2.3.2 - 2017-06-16

Fixed

  • correct typo: esrifieldTypeInteger => esriFieldTypeInteger
  • object ids no longer undefined on limit queries

2.3.1 - 2017-06-15

Fixed

  • Serialize date fields as UNIX timestamps
  • Response when objectids query is for a single feature

2.3.0 - 2017-06-05

Added

  • Server metadata supports hasStaticData and maxRecordCount

2.2.0 - 2017-06-05

Added

  • Support displayField, timeInfo, maxRecordCount, idField

2.1.0 - 2017-06-02

Added

  • Support for passing a server extent e.g. [[-180, -90], [180, 90]]
  • Support passed geometryType passed in layer metadata

2.0.0 - 2017-06-01

Added

  • /FeatureServer supports multiple layers

Breaking

  • rename serviceInfo => serverInfo
  • remove serviceInfo public API
  • rename layers => layersInfo

1.3.4 - 2017-04-03

Fix

  • OBJECTID is in the fields array only layer request

1.3.3 - 2017-03-28

Fixed

  • OID rewrite is now correct

1.3.2 - 2017-03-28

Changed

  • Better way of handling oid overwrite

1.3.1 - 2017-03-28

Fixed

  • Don't overwrite OBJECTID field if it already exists

1.3.0 - 2017-03-16

Added

  • Support for f=geojson

1.2.5 - 2017-02-28

Fixed

  • Prevent exception on queries with no features

1.2.4 - 2017-02-27

Fixed

  • Prevent object ids from being reshuffled on similar requests

1.2.3 - 2017-02-27

Fixed

  • Correct response on /FeatureServer endpoint

1.2.2 - 2017-02-14

Fixed

  • Set geometry type correctly on query

1.2.1 - 2017-02-14

Fixed

  • Correctly compute spatialReference field

1.2.0 - 2017-02-10

Added

  • Support for outSR

1.1.1 - 2017-02-09

Fixed

  • Features are serialized correctly

1.1.0 - 2017-02-06

Changed

  • Enable orderByFields

1.0.10 - 2017-02-06

Fixed

  • Create correct response for group by statistics

1.0.9 - 2017-02-06

Added

  • Handle JSON parameters in all query options

1.0.8 - 2017-02-02

Fixed

  • Exclude features from layer info response

1.0.7 - 2017-02-02

Fixed

  • Coerce all query parameters to true or false before any function is executed

1.0.6 - 2017-02-01

Fixed

  • Pre es6 compatiblity

1.0.5 - 2017-02-01

Fixed

  • Build error

1.0.4 - 2017-02-01

Changed

  • Reorganize templates

1.0.3 - 2017-02-01

Fixed

  • Dont overwrite templates/index in compile step

1.0.2 - 2017-01-31

Fixed

  • Geometry query is parsed as json

1.0.1 - 2017-01-31

Fixed

  • Remove Standard from deps
  • Fix reference errors in query

1.0.0 - 2017-01-25

  • Initial Release