2.0.0 • Published 5 years ago

ember-arcgis-server-services v2.0.0

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
5 years ago

ember-arcgis-server-services

npm version build status apache licensed

Ember Services for working with ArcGIS Server Services.

ArcGIS Server Services

After adding this to your project, you will have a number of services available for injection into your routes/controllers/services.

Dependencies

This project is now using ember-network/fetch to enable fastboot compatibility.

Installation

To consume this library in any ember application:

  • ember install ember-arcgis-server-services

Shared Methods

All the services expose a set of shared helper methods:

MethodReturnsDescription
encodeFormstringThis is used internally. Formats an object into a html form. In most cases, not necessary to call this.
request (url, options)promiseThis is used internally. Promisified xhr that does basic handling of Portal's 400-in-a-200 errors
parseServiceUrl (url)Parses up the url and returns a hash of useful information - the service url, type, layerId if present, orgId if hosted
getServerInfo(url)promiseReturns the f=json metadata for the server

Vector Service

All functions supported by the Vector Service are all supported by Feature Service and Map Service

MethodReturnsDescription
query(url, options)promiseQuery the feature service
getById(url, id)promiseReturns the record by Id
getLayerInfo(url)promiseReturns the f=json for the service
getLayersInfo(url)promiseReturns the f=json for all layers and tables in the service

Feature Service

All the services expose a set of shared helper methods:

MethodReturnsDescription
updateFeature(url, feature, token)promiseUpdate a Feature
updateFeatures(url, features, token)promiseUpdate a set of Features
addFeature(url, feature, token)promiseAdds a Feature
addFeatures(url, features, token)promiseAdds a set of Features
deleteFeature(url, feature, token)promiseDelete a Feature
deleteFeatures(url, features, token)promiseDeletes a set of Features
applyEdits(url, adds, updated, deletes, token)promiseApplies a set of edits to the service

Handling Error Conditions

Barring a catastrophic network or server failure, the ArcGIS Server API will always return a 200, which may contain error information in json.

Running

Running Tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions
  • npm run lint:hbs
  • npm run lint:js
  • npm run lint:js -- --fix

Building

For more information on using ember-cli, visit http://ember-cli.com/.

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

License

Copyright © 2017-2019 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file.

2.0.0

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.1

6 years ago

1.4.0

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.4.9

7 years ago

0.4.8

7 years ago

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago