Hierarchy

  • default

Constructors

Properties

emitter: EventEmitter = ...
id: number = ...
resources: ResourcesControl
user?: UserInfo
errors: {
    NgwError: typeof NgwError;
    ResourceNotFoundError: typeof ResourceNotFoundError;
} = ...

Type declaration

  • NgwError: typeof NgwError
  • ResourceNotFoundError: typeof ResourceNotFoundError

Methods

  • Send request to NGW api router.

    Example


    // there is such an NGW route item
    // "feature_layer.feature.item": [
    // "/api/resource/{0}/feature/{1}",
    // "id",
    // "fid"
    // ],

    const connector = new NgwConnector({ baseUrl: 'https://example.nextgis.com' });
    connector.apiRequest('feature_layer.feature.item', {
    // request params for {0} and {1}
    'id': 2011,
    'fid': 101,
    // query params
    'srs': 4326,
    'geom_format': 'geojson',
    }, { method: 'GET' });
    // send get-request to 'https://example.nextgis.com/api/resource/2011/feature/101?srs=4326&geom_format=geojson'

    Type Parameters

    Parameters

    Returns default<P[K]>

  • Establishing a connection with NextGIS Web to fulfill all other requests.

    Remarks

    This method need not be called manually as it is used when forming a request in apiRequest. Can be used to check connection.

    Example

    const connector = new NgwConnector({baseUrl: 'https://demo.nextgis.com'});
    connector.connect()
    .then(() => console.log('Ok'))
    .catch((er) => console.log('Connection problem', er));

    Returns default<PyramidRoute>

  • Fast way to specify the connection address to NextGIS Web. The current connection will be severed.

    Parameters

    • baseUrl: string

      NGW url

    Returns void

Generated using TypeDoc