This module provides functions to retrieve data from and upload data
to an OSM server.
- Source:
-
Example
import {Api, ChangesetApi, ApiConfig} from 'josm/api'
-
BasicCredentials
-
Basic credentials replied by getCredentials
Properties:
Name |
Type |
Description |
host |
string
|
the host name |
user |
string
|
the user name |
password |
string
|
the password |
- Source:
-
-
BoundsSpec1
-
Specification of a bounds as JavaScript object.
Properties:
Name |
Type |
Description |
minlat |
number
|
|
minlon |
number
|
|
maxlat |
number
|
|
maxlon |
number
|
|
- Source:
-
Example
const bounds = {
minlat: 46.9479186, minlon: 7.4619484,
maxlat: 46.9497642, maxlon: 7.4660683
}
-
BoundsSpec2
-
Specification of a bounds as JavaScript object.
Properties:
- Source:
-
Example
const bounds = {
min: {lat: 46.9479186, lon: 7.4619484},
max: {lat: 46.9497642, lon: 7.4660683}
}
-
DownloadObjectOptions
-
Options for the method downloadObject()
Properties:
Name |
Type |
Argument |
Default |
Description |
full |
boolean
|
<optional>
|
false
|
if true , the object and its immediate children are
downloaded, i.e. the nodes of a way and the relation members of a relation. Default:
false . |
version |
number
|
<optional>
|
|
if present, the specified version of the object is downloaded.
If missing, the current version is downloaded. If present, the
option full is ignored. |
- Source:
-
-
DownloadReferrerOptions
-
Options for the method donwloadReferrers()
Properties:
Name |
Type |
Argument |
Default |
Description |
full |
boolean
|
<optional>
|
false
|
If true , the full objects are
retrieved using multi-gets. If missing or false ,
only proxy objects are downloaded. Default: false |
- Source:
-
-
LatLonSpec
-
Specification of position as lat/lon-pair.
Properties:
Name |
Type |
Description |
lat |
number
|
the latitude |
lon |
number
|
the longitude |
- Source:
-
-
OAuthCredentials
-
OAuth credentials replied by getCredentials
Properties:
Name |
Type |
Description |
key |
string
|
the OAuth key |
secret |
string
|
the OAuth secret |
- Source:
-
-
SetOrGetCredentialOptions
-
Options for the method setCredentials
- Source:
-
-
UploadOptions
-
Options for the method upload()
Properties:
Name |
Type |
Argument |
Default |
Description |
strategy |
string
|
UploadStrategy
|
<optional>
|
|
Indicates how the data is uploaded.
Either one of the strings
- individualobjects
- chunked
- singlerequest
or one of the enumeration values in
{@class org.openstreetmap.josm.io.UploadStrategy}.
Default value: UploadStrategy.DEFAULT_UPLOAD_STRATEGY |
changeset |
number
|
Changeset
|
<optional>
|
|
The changeset to which the data is uploaded.
Default: creates a new changeset |
chunkSize |
number
|
<optional>
|
|
the size of an upload chunk if the data is uploaded with the
upload strategy {@class org.openstreetmap.josm.io.UploadStrategy}.CHUNKED_DATASET_STRATEGY. |
closeChangeset |
boolean
|
<optional>
|
true
|
if true, closes the changeset after the upload |
- Source:
-